#2016-05-0316:44ag@burpydave: I think parinfer.el still has some issues. Also no one in spacemacs community (it feels to me) is very motivated to bring parinfer layer, maybe people feel cozy enough with smartparens? I dunno#2016-05-0316:45agI would love to have parinfer in Spacemacs#2016-05-0318:01bojan.maticwhat issues are there with parinfer.el?#2016-05-0318:02eggsyntaxhttps://github.com/syl20bnr/spacemacs/issues/5574#2016-05-0414:20bojan.matichey guys, i just did a fresh install of emacs on os x#2016-05-0414:20bojan.maticand i canāt change the font size#2016-05-0414:21bojan.maticI changed the default font to this:
dotspacemacs-default-font '("Source Code Pro"
:size 16
:weight normal
:width normal
:powerline-scale 1.1)
#2016-05-0414:21bojan.maticonly increased size to 16#2016-05-0414:21bojan.maticbut nothing changes#2016-05-0414:23eggsyntax@bojan.matic: I assume that by emacs you mean spacemacs? But in any case, I'm seeing that same behavior. Try the menu item options/set-default-font.#2016-05-0414:24bojan.maticthis is a fresh os x installation, so i installed emacs fresh too#2016-05-0414:24bojan.maticbut i used the instructions on spacemacs repo#2016-05-0414:24eggsyntaxAh, ok.#2016-05-0414:24bojan.matic$ brew tap d12frosted/emacs-plus
$ brew install emacs-plus --with-cocoa --with-gnutls --with-librsvg --with-imagemagick --with-spacemacs-icon
$ brew linkapps
#2016-05-0414:24eggsyntax:thumbsup:#2016-05-0414:25eggsyntaxdoes the menu item do it?#2016-05-0414:25bojan.maticwhat menu item?#2016-05-0414:25eggsyntaxSee above. Options/set-default-font.#2016-05-0414:26bojan.maticspacemacs menu?#2016-05-0414:26bojan.maticthe one shown on startup?#2016-05-0414:26eggsyntaxNo, the GUI window at the very top.#2016-05-0414:27eggsyntaxHaving to turn to the GUI isn't an optimal solution, of course, but it's one that at least works for me.#2016-05-0414:27eggsyntaxHuh, that screenshot shows blank for me.#2016-05-0414:28bojan.maticactually i have nothing in the menu#2016-05-0414:28bojan.matichttp://prntscr.com/b06ch5#2016-05-0414:28eggsyntaxHuh. Odd.#2016-05-0414:28eggsyntaxI'd try the spacemacs gitter.#2016-05-0414:28eggsyntaxhttps://gitter.im/syl20bnr/spacemacs#2016-05-0414:58bojan.maticsolved it, wasnāt typing the font name correctly#2016-05-0414:59bojan.maticI didnāt have Source Code Pro under that name, it was slightly different#2016-05-0414:59eggsyntaxArgh! I hate when that happens š#2016-05-0415:00eggsyntaxI do wonder why you don't have the GUI menu. Maybe you started emacs from the command line rather than the spacemacs icon?#2016-05-0415:00eggsyntaxI only ever start emacsclient from the CLI, so I dunno.#2016-05-0415:19Chris OāDonnellI'm running Ubuntu, so it could be totally different, but I also don't have a GUI menu FWIW.#2016-05-0416:04bojan.maticno, i started it from the launcher#2016-05-0416:04bojan.maticthey mentioned on gitter that there are some menu bar fixes on develop#2016-05-0416:04bojan.maticbut i dont care about the menu bar so iām not poking at it now#2016-05-0416:05bojan.maticdonāt touch it if it works š#2016-05-0417:15eggsyntaxIndeed simple_smile. I don't use it for much of anything. Easy enough to hit SPC-? or SPC-: and find whatever command you want without messing w/ the mouse.#2016-05-0418:34agdoes anyone know how to ignore smartparens strict mode when inserting a paren? So if you deliberately want to insert an unbalanced paren (one time only) having to disable strict mode and then re-enabling it seems to be way to much of hand-waving.#2016-05-0418:39mahinshaw@ag: You probably just need to toggle the var, which is buffer local#2016-05-0418:40mahinshawsmartparens-strict-mode#2016-05-0418:40mahinshawdonāt know how that will affect the global set#2016-05-0418:41ag@mahinshaw: I guess you didnāt get the question. I am fine with strict-mode enabled. Sometimes though you want deliberately insert an unbalanced paren (ignoring the enabled strict-mode). The question is: is that achievable without having to disable/enable strict mode?#2016-05-0418:42agmaybe by holding some key while inserting a paren?#2016-05-0418:42mahinshawThat I think was my point. To acheive that you need to toggle the var#2016-05-0418:44ag@mahinshaw: once again, please read the question. I think you donāt get it#2016-05-0418:49aghere⦠I found it⦠pressing M-( inserts a couple of parentheses ignoring strict-mode#2016-05-0419:38wamaral@ag in evil-insert-mode you can use C-v<char> to insert char literally, disregarding plugins#2016-05-0419:38wamaral(as in vim, btw)#2016-05-0419:55ag@wamaral: oh. cool⦠thanks a lot. this is very useful. Didnāt know about this#2016-05-0514:32cpmcdanielhmm, so I canāt find away to get sp-navigate-reindent-after-up to actually work. Any smartparens gurus know how to make this happen?#2016-05-0514:33cpmcdanielitās supposed to remove whitespace (including newlines) to the end of the expression when calling sp-up-sexp#2016-05-0514:34cpmcdanielso (foo |3) ) => (foo 3)) ;; when typing ā)'#2016-05-0514:34cpmcdanielone of my favorite features of paredit#2016-05-0604:42bendy@bojan.matic @eggsyntax fwiw, I find setting menu-bar-mode to any value, for example putting (menu-bar-mode t), will bring up the options at the top. Just for future reference!#2016-05-0613:06eggsyntax@bendy: oh, right, should have expected there to be a var controlling it. Mine was there at first install IIRC, so I never thought about it.#2016-05-0914:39janiczekanybody else having problems with upgrading package /cdn-cgi/l/email-protection?
gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated.#2016-05-0916:06mahinshaw@janiczek: I just updated with no problems.#2016-05-0916:11ag@janiczek: have you tried rimraffing elpa and .cache folders?#2016-05-1210:37bojan.maticstarting clojurescript (figwheel) repl with SPC m s I and then typing :cljs/quit leaves the REPL in a broken state regarding figwheel#2016-05-1210:37bojan.maticit should give a prompt for choosing a build to switch figwheel to#2016-05-1210:37bojan.maticbut nothing happens, the repl just prints out nil#2016-05-1210:37bojan.maticwhat am i doing wrong?#2016-05-1420:29nathansmutzI'm trying to figure out whether I need to recompile emacs (24.5) The spacemacs installation printed a lot of warnings, some of them seemingly about missing funcgtions:
n end of data:
highlight.el:3174:1:Warning: the following functions are not known to be defined:
icicle-make-face-candidate, icicle-transform-multi-completion,
icicle-make-color-candidate, hlt-highlight-regions,
zz-izone-limits-in-bufs, hlt-unhighlight-regions,
hlt-listify-invisibility-spec, hlt-set-union, hlt-next-highlight,
hlt-add-listifying, hlt-add-to-invisibility-spec, hlt-flat-list,
hlt-set-intersection, hlt-toggle-link-highlighting,
hlt-toggle-property-highlighting, hlt-unhighlight-all-prop,
hlt-highlight-all-prop, hlt-highlight-property-with-value#2016-05-1520:49jasonjckni always try nuking .emacs.d/elpa folder first#2016-05-1622:42agdoes anyone know a package that lets you convert json into edn and vice-versa?#2016-05-1622:42agI donāt wanna waste time writing one and then find out thereās better alternative out there#2016-05-1702:02eggsyntax@ag: for spacemacs, you mean? There are certainly clj/s ways to do it -- offhand, I think it'd be pretty easy w/ transit-clj (or transit-cljs). Haven't heard of a spacemacs package that touches on that, but haven't looked either.#2016-05-1702:04eggsyntaxAn elegantly simple solution on the cljs side: https://stackoverflow.com/a/28877884#2016-05-1710:09marcoHi. I have to activate the cider mode on clojure files by hand. Any idea what I missed when installing cider?#2016-05-1722:33jasonjckn@marco the clojure layer does that for me out of the box#2016-05-1807:44marco@jasonjckn: I thought so, too. I will have to dig into it.#2016-05-1921:25mathpunkSo, the spacemacs clojure layer assumes you want to use Cider. But, itās suggested here https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-with-Emacs-Inferior-Clojure-Interaction-Mode that nREPL<=>ClojureScript is pretty hard.#2016-05-1921:25mathpunkI got to thinking: Maybe I could make a layer that sets up inf-clojure <=> figwheel#2016-05-1921:25mathpunkbut I doubt Iām the first person to think of this. How are we doing on ClojureScript in Spacemacs?#2016-05-1921:26mathpunkAlso I havenāt made a layer in spacemacs before. Also I donāt quite understand how figwheel works. So uh#2016-05-1921:26mathpunkMaybe Iām being overly optimistic#2016-05-2007:30hkjels@mathpunk: Iām running figwheel and Cider without having noticed any real issues#2016-05-2007:31hkjelsSince I have figwheel, I donāt really use the REPL that much though, but it works#2016-05-2007:32hkjelsJust be sure to Jack-in-clojurescript instead of clojure#2016-05-2016:44mathpunk@hkjels: Hm. Can you tell me how you set up your lein profile? The last time I tried it seemed like there was stale information on how to set the system up#2016-05-2017:47mahinshaw@mathpunk: https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl#integration-with-emacscider#2016-05-2017:48mahinshawI use figwheel daily with cider. No problems. Just checkout the above link. Let me know if you have any ?ās#2016-05-2017:49mathpunk@mahinshaw Thanks! That looks updated since the last time I gave it a shot#2016-05-2017:51mahinshawyeah itās pretty helpful. I also make a dir-local.el with this ((nil . ((cider-cljs-lein-repl . "(start-figwheel)")))), where (start figwheel) is in my user.clj, which starts figwheel for me when is call cider-jack-in-clojurescript.#2016-05-2017:52mathpunknice#2016-05-2017:52mathpunkwill i need to load that from my .spacemacs somewhere? i donāt actually know how to load .el files. Having not come from emacs, thereās some idioms I feel Iām missing#2016-05-2017:54mahinshawno. you put a dir-local.el file in the project you are working on (or in a directory above, if you have a bunch of projects with the same config style). and emacs will find the file for you when you enter the directory. So there really isnāt anything you have to do after that.#2016-05-2017:55mahinshawhttps://github.com/bbatsov/projectile#storing-project-settings#2016-05-2017:55eggsyntaxNote that cljs repl behavior in CIDER changed between versions 12/13, so @mathpunk you may get some confusing instructions here from people on other versions.#2016-05-2017:55mahinshawThat link will also point you to the gnu docs on per-directory local vars.#2016-05-2017:56mahinshawIām on 13#2016-05-2017:56eggsyntax(can't tell y'all a lot of details on changes, I'm afraid, this is via discussion of it w/ a friend who switched to 13 recently. I'm still on 12 myself)#2016-05-2017:56mahinshawAnd Iām pretty sure this worked on 12 as well.#2016-05-2018:33hkjels@mathpunk: sorry, I was actually lying to you. I have figwheel-sidecar set up in my project. Did you get it up and running?#2016-05-2018:38mathpunkNo, I probably wonāt have a chance to try until this evening or after the weekend#2016-05-2018:38mathpunk^ @hkjels#2016-05-2021:17mathpunk@hkjels Turns out I do have time. Iām setting up the clojure layer, and Iām getting this:#2016-05-2102:31mathpunk@hkjels Hereās what Iāve got working:#2016-05-2102:31mathpunkI open a cljs file.
I jack into Clojure (NOT ClojureScript).
(use 'figwheel-sidecar.repl-api)
(start-figwheel!)
(cljs-repl)#2016-05-2102:32mathpunkAnd Iām connected to the application.#2016-05-2102:33mathpunkNext up will be adding the snippet you mentioned, with the cider-cljs-lein-repl, and setting up a user.clj#2016-05-2102:34mathpunkSomewhere I picked up, (setq cider-cljs-lein-repl "(do (use 'figwheel-sidecar.repl-api) (start-figwheel!) (cljs-repl))ā)#2016-05-2102:35mathpunkFor tonight Iāll just be happy that Iām jacked into the browser, though, and figure out how to lessen the number of commands later : )#2016-05-2102:46mahinshaw@mathpunk: Regarding the warning. It may be worth making sure you have updated all your packages. Glad to hear itās working for you!#2016-05-2102:47mathpunk@mahinshaw Iāve been @ing the wrong person wheeeee.#2016-05-2102:47mathpunk@mahinshaw Hm. How do I force an update then? Iāve been just upgrading spacemacs when it becomes available#2016-05-2102:49mahinshawThat should do it. The newer version of cider will actually modify lein deps for you. Are you calling cider-jack-in or cider-connect?#2016-05-2102:52mahinshawIt may just be worth bumping the cider-nrepl version in your lein profile anyways so you are up to date#2016-05-2102:53mathpunkWell, I was reading bhaumanās explanation. First time, I tried lein repl and starting figwheel inside it, and cljs-repl, then connecting. Second time, I jacked into a clojure repl, started figwheel, started cljs-repl.#2016-05-2102:54mathpunkWhat do I need to have in my profile? this is a new machine, itās got nothinā, and what I gathered from the newer CIDER docs, I donāt need things like alembic#2016-05-2102:56mahinshawYou shouldnāt need anything if you call cider-jack-in, because it will inject the deps for you. If you call cider-connect (to connect to an nrepl session from the command line). you need to have the deps in your ~/.lein/profile.clj#2016-05-2102:57mahinshawI have this { :repl {:plugins [[cider/cider-nrepl "0.13.0-SNAPSHOTā] [refactor-nrepl "2.3.0-SNAPSHOT"]]}} in my profile.#2016-05-2102:58mahinshawit can be under :user or :repl#2016-05-2102:59mathpunkHm. How do I update cider to 13 from 12?#2016-05-2103:00mathpunkfound a likely candidate function in emacs...#2016-05-2103:01mahinshawThat should be the emacs package. Which you should get when you update packages in spacemacs/emacs#2016-05-2103:05mathpunkWell thatās odd.#2016-05-2103:05mathpunkI updated packages and got the same results. Maybe the wrong package update?#2016-05-2103:06mathpunki.e., the wrong function#2016-05-2103:08mahinshaw[Update Packages] on the spacemacs home page. Not [Update Spacemacs]#2016-05-2103:12mathpunkTHERE we go#2016-05-2103:12mathpunkAlso I restarted the whole editor, which may have helped#2016-05-2103:12mathpunkI kinda think I did Spacemacs/Update Packages but, idk#2016-05-2103:12mathpunkanyway! sweet#2016-05-2103:13mathpunkNow Iām trying to jack into clojurescript#2016-05-2103:13mathpunkI added (setq cider-cljs-lein-repl "(do (use 'figwheel-sidecar.repl-api) (start-figwheel!) (cljs-repl))ā) based on something in cider docs#2016-05-2103:15mathpunkHm. Thatā¦. kinda looked like a Clojure repl?#2016-05-2103:16mathpunkLemme stop and make sure I get the whole concept:#2016-05-2103:16mathpunkcurrently, I do not have figwheel running, and as expected, localhost:3449 doesnāt connect#2016-05-2103:17mathpunkThe idea is, set up Spacemacs to, when jacking in to ClojureScript, to instead start a Clojure repl, load some of sidecar, and start a cljs-repl, right?#2016-05-2103:18mathpunk@mahinshaw ^Getting there...#2016-05-2103:19mathpunkGotta pause for the night though. Thanks so much for the assistance!#2016-05-2103:21mahinshawyeah no problem.#2016-06-0618:39bjahelm-descbindings is actually causing me to learn emacs#2016-06-0716:08kasukoHey. I use Spacemacs and CIDER ⦠now it appears the latest version requires lein 2.5.2 but for work we are locked at lein 2.5.1 for compile issues with clojurescript. Is there a way to downgrade the CIDER provided via the clojure layer?#2016-06-0719:09ag@kasuko: may this would help https://github.com/syl20bnr/spacemacs/issues/2057#2016-06-0721:48kasukoThanks#2016-06-0812:37bojan.maticwhich i why i eventually stopped using spacemacs and emacs altogheter#2016-06-0812:37bojan.matici think emacs has the most unstable packages out of any editor#2016-06-0813:44kasuko@bojan.matic: I mean my issue is because I am being forced to use old versions of software against my will and nothing good happens from that regardless of what you use. If I just upversion to the latest version of leinigen then everything works fine, so itās not really a mark against spacemacs or emacs.#2016-06-0813:45bojan.matici was just commenting on the issue of pinned package dependencies#2016-06-0813:45bojan.matic> This leaves us with the fun situation where Spacemacs stability is a function of todays date.#2016-06-0813:45bojan.maticthis is a sad affair, that isnāt at all helped by the fact that the packages seem to break at random intervals#2016-06-0813:45bojan.maticthat is one of the reasons why i ultimately abandoned emacs as my editor, some years ago#2016-06-0818:18ag@bojan.matic:
> i think emacs has the most unstable packages out of any editor
Sublime, Atom, VS Code and even IntelliJās plugins arenāt less buggy. Average number of packages any Emacs user uses anytime is usually a lot bigger than number of plugins utilized in any other editor. Given the fact that itās almost 100% open sourced software weāre talking about you should be surprised that it works at all and people have used Emacs for decades and I bet it will survive another 50 years#2016-06-0818:57bojan.maticthat doesnt help me when my editor breaks if i install it on tuesday on a new machine#2016-06-0818:57bojan.maticiām mostly using atom now, and I update packages all the time, with no breakage#2016-06-0818:58bojan.maticmaybe i was just unlucky, maybe i was doing some things wrong, but thatās the general impression i got#2016-06-0819:31jasonjcknwhen I type "ui/" in my clojure file I automatically get a namespace required#2016-06-0819:31jasonjcknany way to disable this?#2016-06-0819:34jasonjcknfound it cljr-magic-requires#2016-06-0820:40mahinshaw@jasonjckn: I have this to overide that mapping: (with-eval-after-load 'clj-refactor (define-key clj-refactor-map "/" nil) (evil-define-key 'insert clj-refactor-map (kbd "s-/") 'cljr-slash))#2016-06-0820:41jasonjckncool thanks#2016-06-0822:17rcanepaI am struggling with trying to expand an expression (hash map) in the Inspector (cider-inspect)⦠does anyone knows what keys do I have to press in order to expand it?ā¦#2016-06-0822:18rcanepahttp://s33.postimg.org/dtwaz0w27/cider_inspect.png#2016-06-0822:19rcanepaI would like to expand those āā¦ā.#2016-06-0822:47agzo doesnāt?#2016-06-0822:53mahinshaw@rcanepa: https://github.com/clojure-emacs/cider/blob/master/cider-inspector.el#L56#2016-06-0822:54mahinshawI donāt remember if spacemacs overloads those#2016-06-0822:58rcanepaAccording to spacemacs docs, I should be able to inspect an expression with RET#2016-06-0822:58rcanepahttps://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/clojure#inspector-mode#2016-06-0822:58rcanepaBut, it doesnāt work⦠maybe I am doing something wrong#2016-06-0823:03mahinshawIf I put the cursor on top of the item it navigates#2016-06-0823:08mahinshawnvm, I just get nil when I navigate down#2016-06-0916:39ag@bojan.matic: Iāve using develop branch of Spacemacs since Sept. of last year. I pull latest and update packages almost daily. How many times something broke so critically that it took me more than 10 minutes to figure out and issue either a permanent of a temporary fix? Exactly four times. And this is my main tool, I spend less time fiddling in the browser.#2016-06-0916:45agYou wanna know how much I spent waiting for certain features to be fixed/implemented in IntelliJ? For months.#2016-06-1118:40meowyI just got SOLD by Spacemacs. It's like vim, but nicer, and the Clojure support through CIDER's real nice!#2016-06-1118:41meowy@ag: You know what frustrates me about Cursive? The fact that it hasn't added Boot support since two years.#2016-06-1118:45meowySo the only way to work with it is to add a stub project.clj that lists up dependencies for Cursive to interpret. It's annoying.#2016-06-1203:56delaguardothere is another option - use maven build system instead of stubbing project.clj#2016-06-1203:56delaguardohttps://github.com/andrewmed/boot-maven-interop#2016-06-1215:26meowyWhen an unhandled exception occurs when refreshing a source file in Cider, I don't get the message for it.#2016-06-1215:27meowyOr I do, but it's not expanded. How do I expand it?#2016-06-1215:30meowyOh, figured it out. I just press 2.#2016-06-1215:32meowyWould be nice if the "topmost" exception's message would be expanded by default, though. Can this be changed for cider-error?#2016-06-1216:07meowyAlso, for some reason, my top-level comments seem to get automatically indented for some reason.#2016-06-1419:09csmith@meowy: Yes, this especially happens with aggressive-indent-mode or similar. If you want a comment on a line of its own you can use two semicolons. If you use one semicolon, it treats/interprets it as like an inline comment for the end of a line#2016-06-1419:10csmith(this is originally a scheme (maybe common lisp?) convention as I understand it)#2016-06-1419:11meowyAh, neat. I'll use two semicolons from now on, then.#2016-06-1419:11csmithI think Cursive doesnāt do this (at least by default) so it is a minor source of confusion on projects where folks use either#2016-06-1419:12meowybbatsov's Clojure style guideline recommends such, too.#2016-06-1419:12csmithah cool. good to know#2016-06-1419:12meowyhttps://github.com/bbatsov/clojure-style-guide#two-semicolons-for-code-fragment#2016-06-1716:40zaneWhat's the right way to set Spacemacs toggles globally on startup?#2016-06-1716:53mahinshawfind the var that it refers to and (setq my-toggle t) or nil if you want it off, in your user-config.#2016-06-1717:24zane@mahinshaw: So, the toggle in this particular case isn't a var: SPC t l calls toggle-truncate-lines.#2016-06-1717:25zaneI guess what I want instead is a mode-specific hook?#2016-06-1717:28mahinshawWell, you could put (setq truncate-lines nil) in your config, which will turn it off in all new buffers. If you want to to be mode specific, you need to add a hook to that mode.#2016-06-1717:31mahinshawsorry, toggle-truncate-lines just toggles truncate-lines#2016-06-1717:31mahinshawor better yet (set-default ātruncate-lines t)#2016-06-1717:32mahinshawswap nil or t for your use case#2016-06-2012:02reefersleepWhen I try to write { (Alt-Shift-8) or [ (Alt-8) in Insert mode, Spacemacs executes some commands instead. Is there some smart way to change or avoid this?#2016-06-2012:03reefersleepIt's a bit hard to program Clojure without those chars š#2016-06-2012:04reefersleepI'm on a Mac btw#2016-06-2012:07reefersleepI think I might have found something.... https://github.com/syl20bnr/spacemacs/issues/973 . Refers to a fix using a layer variable called osx-scandinavian-keyboard-layout.#2016-06-2012:09reefersleepJust can't figure out how to add the configuration š#2016-06-2012:59tord@reefersleep: I don't know, but is there any reason why you have to use a Scandinavian keyboard layout? As a Scandinavian myself, I find the Scandinavian layouts to be unbearably painful for any kind of programming (Alt+Shift combos for curly braces? Seriously?). I always use a US layout when programming, as do most of the other Scandinavian programmers I know. When I need to type something in Scandinavian, I just switch input method to latin-1-postfix.#2016-06-2013:04tordIn addition to the various characters being easier to type on a US keyboard layout, a further advantage is that most of the standard vim/spacemacs key press sequences are more comfortable.#2016-06-2013:26reefersleep@tord: I recognize the comfort of a vim-friendly layout, but I would prefer staying with a Danish keyboard layout - I've already got confusing configurations going on, remapping CapsLock and Tab, and certain key combinations. And I'm still in a learning phase with Emacs. I'm very comfortable (usage-wise, perhaps not ergonomics-wise š ) with the Danish keyboard layout for Vim. And I'm trying to be easy on other people using my computer as well š#2016-06-2013:27reefersleepbtw, I've also tried following the instructions on https://github.com/syl20bnr/spacemacs/tree/master/layers/osx , but I haven't had any luck. Maybe I'm not applying the options correctly in my .spacemacs.#2016-06-2014:07reefersleepI finally figured it out, it was not a spacemacs-specific solution, though#2016-06-2014:08reefersleepI added (setq mac-option modifier nil) to my user-config thusly:#2016-06-2014:09reefersleep(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration. You are free to put any user code."
(setq-default evil-escape-key-sequence "jk")
(setq-default evil-escape-delay 0.2)
;; Make linums relative by default
(global-linum-mode nil)
(linum-relative-toggle)
;; (evil-want-fine-undo nil)
(setq mac-option-modifier nil)
)
#2016-06-2108:42reefersleepI have the Clojure layer active (some commands work fine), but for some reason, cider-jump-to-resource is void. Does anyone have an idea why?#2016-06-2108:43reefersleepI've connected to a working ClojureScript repl.#2016-06-2109:03reefersleepI've also tried including an nrepl in ~/.lein/profiles.clj#2016-06-2116:49ag@reefersleep: as far as I know Clojurescript is not fully supported in CIDER yet#2016-06-2120:43gowderI don't suppose anyone has a .spacemacs they want to share in which they've gotten all the org-babel-clojure literate programming sexiness working? Sufficiently new to emacs that I'm not sure how much of the config on the doc (https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html) just translates straight from vanilla emacs to spacemacs with layers and such...#2016-06-2123:07mahinshaw@gowder: This might be helpful - http://fgiasson.com/blog/index.php/2016/06/16/improving-org-babel-clojure/#2016-06-2214:24gowderThanks @mahinshaw #2016-06-2409:23reefersleep@ag: I figured that it was actually cider-jump-to-var that I wanted, and that it works. No idea why jump-to-resource doesn't work, though.#2016-06-2415:32eggsyntax@reefersleep: I donāt have cider-jump-to-var ā youāre sure that was it? Could be a version difference.#2016-06-2613:10akivaAnyone seeing this when updating packages?
Warning (emacs): Unable to activate package `helm-gitignore'.
Required package `request-0.1.0' is unavailable
It doesnāt seem to be negatively affecting anything but I always get a bit OCD when I see something like this kick back.#2016-06-2614:11Chris OāDonnell@akiva: I see that as well. Also not noticing any negative effects.#2016-06-2716:19ag@akiva sometimes when a maintainer updates a package on MELPA, some of the dependencies may lag behind. it takes approximately 4hrs for MELPA to completely scan its DB (or so I heard) and acknowledged all the recent updates. You can subscribe to @melpa_emacs on twitter and check for missing package(s), once you see itās updated you just have to re-run the update.#2016-06-2814:40akivaThe solution is here: https://github.com/syl20bnr/spacemacs/issues/5523#2016-06-2814:40akivaBasically, just delete the helm-gitignore package from ~/.emacs.d/elpa. And restart (of course).#2016-06-2921:36jasonjcknhow do I check if cider-load-buffer succeeded without exceptions?
afaik it always returns nil#2016-06-2921:59mahinshawLook at the repl. See if there are error messages#2016-06-2922:17jasonjcknI'm scripting (cider-load-buffer)#2016-06-2922:27mahinshawthereās no cider nrepl buffer?#2016-06-3021:11jasonjckn@mahinshaw: there's cider-error I could kill that buffer before calling cider-load-buffer , then search it for exceptions after some delay#2016-06-3021:11jasonjcknideally cider-load-buffer would return success or fail but I think it's async#2016-06-3021:11jasonjcknin any case returns nil regardless#2016-06-3021:12mahinshawIt returns the result of the last form it evaluates#2016-06-3021:12mahinshawby that i mean cider-load-buffer#2016-06-3021:12jasonjcknhm, so if my last form evaluates to nil, vs an exception..#2016-06-3021:12jasonjcknsome return value#2016-06-3021:12mahinshawyes#2016-06-3021:12jasonjcknsame*#2016-06-3021:13mahinshawso if you last form is a defn, it will return the function#2016-06-3021:13mahinshawand the repl should show the compiler error#2016-06-3021:13jasonjcknit does, but i'm trying to script this, so I can't catch compiler errors in elisp#2016-06-3021:15mahinshawah. That might be a good question for the guys in the #C0617A8PQ slack channel, or on their gitter chat#2016-06-3021:16jasonjcknk#2016-07-0118:56jasonjcknoften times my spacemacs is stuck with a search expression highlighted in yellow in the current buffer#2016-07-0118:56jasonjcknI try clearing the search expression, but not sure how#2016-07-0118:56jasonjcknI try "/asdfasdf" and Ctrl+S asdfasdf#2016-07-0119:22akiva@jasonjckn, SPC-s-c.#2016-07-0119:22jasonjcknthank you!#2016-07-0119:23akivaNot a problem, sir.#2016-07-0121:33voxdolo@jasonjckn: the vim ex command :noh (nohighlight) also works#2016-07-0201:47zaneGetting this when I try to install the most recent version of Spacemacs:
Warning (emacs): Unable to activate package `helm-gitignore'.
Required package `request-0.1.0' is unavailable
Guessing it just disappeared from the package repository temporarily?#2016-07-0202:00alandipert@zane: see https://github.com/syl20bnr/spacemacs/issues/5523#2016-07-0202:01alandipert(last comment is the ticket)#2016-07-0414:03akivaHas anyone come across an issue with magit in Spacemacs where, after pushing to a remote (in this case, Github), git-status still shows a ton of commits it claims are unpushed to that same remote?#2016-07-0414:24akivaThink I sorted it. I had local branches named the same as remote branches (i.e., origin/dev). Took those out and the āunpushedā list disappeared.#2016-07-0617:44eggsyntaxI'm using CIDER debugging, and while cider-debug-defun-at-point works as advertised, trying to place #break or #dbg breakpoints doesn't seem to have any effect at all, ie I run code that calls the form containing the #break and nothing happens.
Does this work for anyone else?#2016-07-0619:16eggsyntaxExtremely useful (spac)emacs customization: treat clojure-style words (eg hyphenated words) as single words for purposes of word navigation:
https://timothypratley.blogspot.com/2014/08/clojure-friendly-word-definitions-in.html#2016-07-0619:16eggsyntaxtl;dr:
(dolist (c (string-to-list ":_-?!#*"))
(modify-syntax-entry c "w" emacs-lisp-mode-syntax-table))
#2016-07-0619:49zaneThe above is so you don't have to use SPC k d x?#2016-07-0619:50eggsyntaxWell, not necessarily. It's relevant if I'm just moving by word, for example.
Or do you mean generally that it makes more sense to navigate by sexp?#2016-07-0621:02zaneThat's what I do.#2016-07-0621:02zaneJust trying to understand the motivation.#2016-07-0621:03zaneI spend a lot of time in SPC k mode, which is maybe unusual.#2016-07-0621:28akivaI tried to get into that mode but it seems like too many keystrokes to do what I can more quickly do using smartparens.#2016-07-0622:01zaneThere are built-in Spacemacs bindings for smartparens?#2016-07-0622:02zaneOr do you use chords?#2016-07-0622:07akivaChords. Iām not normally a fan of chording but being able to quickly jump back and forth and up and down nested parens, etc., with single keystrokes is great. Slurpage and barfage is super quick too.#2016-07-0622:07akivaAll without having to leave insert mode.#2016-07-0622:08akivahttps://github.com/Fuco1/.emacs.d/blob/master/files/smartparens.el#2016-07-0712:42kasuko@zane: I also hated the amount of keystrokes to get into lisp mode for spacemacs. I installed the layer evil-cleverparens and havenāt looked back. https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Bvim/evil-cleverparens#2016-07-0712:43kasukoItās new keybindings but I really like them.#2016-07-0712:43kasukoYMMV#2016-07-0713:12akivaInteresting. I might have to give that a go this weekend. [adds Omnifocus task]#2016-07-0714:39zane@kasuko: Ooh, yeah. I'm using evil-cleverparens. When you say that it has new keybindings what do you mean, though? I'm not seeing any new bindings.#2016-07-0714:50kasuko@zane: I mean it uses itās own keybindings. It doesnāt share like the paredit or smartparens bindings if you already knew them.#2016-07-0715:03zaneYou mean like d d, d $, etc? The regular vim keybindings?#2016-07-0715:40kasukoor like > for slurping#2016-07-0718:41alandipertanyone had problems with emacs freezing editing markdown?#2016-07-0718:56gowder@eggsyntax: do you know what the deal is with making that word tweak only attempt to load with relevant modes? I'm using the clojure-mode tweak mentioned in the comments to that blog post, and it works fine when I open emacs with a clojure file, but when I open with an empty buffer it throws the error "Symbol's value as variable is void: clojure-mode-syntax-table"#2016-07-0718:58eggsyntaxI had the same problem. I suspect it's trying to modify the syntax table before the clojure layer has been loaded. I just fell back to the original (emacs-lisp-mode-syntax-table), since it's rare for me to be working in any other lisp mode.#2016-07-0718:59eggsyntax^ that suspicion is just a guess, though, I didn't spend any time investigating.#2016-07-0719:10gowderWait a min, I think I've solved it. Apparently this is what with-eval-after-load is for. So:
(with-eval-after-load 'clojure-mode (dolist (c (string-to-list ":_-?!#*"))
(modify-syntax-entry c "w" clojure-mode-syntax-table )))
#2016-07-0719:11alandipertcould also do (add-hook 'clojure-mode-hook '(lambda () ... anything you want to eval in clojure mode ...)) not sure if it's the same effect#2016-07-0719:11gowder(ugh that indenting has to go next.)#2016-07-0719:12gowderhmm. interesting: this SO suggests the difference is that hooks are per-buffer as opposed to per session once a mode is loaded. https://stackoverflow.com/questions/2736087/eval-after-load-vs-mode-hook#2016-07-0719:14alandipertoh cool, eval-after-load seems more appropriate#2016-07-0719:49eggsyntaxSweet, thanks @gowder!#2016-07-0923:56zaneGetting this:
while: Wrong type argument: stringp, nil
when I try to , t a.#2016-07-1000:16akivaI never use that (I keep a lein trampoline test-refresh going) but I just gave it a shot and saw the same thing. It then crapped out on me anyway because I have my tests named differently than the Clojure standard.#2016-07-1000:16akivaMight want to ask in #C0617A8PQ, though.#2016-07-1821:21csmithI get that as well @zane. Mine reports that, and then works. That error seems like its interpreting something as emacs lisp, with the āstringpā bit#2016-07-1910:35reefersleepHow do I delete a directory in Spacemacs? (It's an empty directory)#2016-07-1910:40reefersleepI've tried navigating to it with dired (SPC a d) and then entering it, and from here, I can apparently rename it (though it does not take effect) with R. I cannot, however, delete it with d or D.#2016-07-1910:40reefersleepWhat I mean by "entering" is loading into a buffer like so:#2016-07-1910:40reefersleep/Users/doe/dev/asdf/asdg/:
total used in directory 0 available 113259813
drwxr-xr-x 2 doe staff 68 Jul 19 10:29 .
drwxr-xr-x 22 doe staff 748 Jul 19 10:29 ..
#2016-07-1913:02reefersleepAnother question: when I indent code with =, such as = a [, the result is not quite how I want it. For example, a hiccup vector containing
[component-name arg1
arg2]
will end up
[component-name arg1
arg2]
, rather than the desired
[component-name arg1
arg2]
. I find this very frustrating, but it I guess it's because the indenting function does not realize that a hiccup vector has a function call in the first position. Do you think this is right? It sees the vector as a flat list, and indents it as such. I wonder if there's a way to change that, though?#2016-07-1916:23mahinshaw@reefersleep: In dired, if you mark the directory to delete with d, all you need to do is press x to execute the marked actions (in this case delete).#2016-07-1919:36zaneOof. Making emacs aware that that particular form is a Hiccup form would be pretty hard to do.#2016-07-1919:42kasuko@zane Iām not aware how emacs detects indenting rules but shouldnāt it be possible to make this work like the indenting of forms in ()#2016-07-1919:42kasukolike without any special formatting I can get the following
(test
test2
test3)
(test test2
test3)
#2016-07-1919:43kasukoso shouldnāt it be possible to get that behaviour with []#2016-07-1919:44kasukoI understand it would be difficult to make it recognize hiccup functions but I think aligning to the second argument in all cases would solve it#2016-07-1919:46zane@kasuko: The difference is that you wouldn't want that behavior always with [ā¦].#2016-07-1919:46zaneOr, at least, there isn't consensus around that. š#2016-07-1919:47kasukoDefinitely. But would it be possible to turn that on by a config hook? Iām looking at the clojure mode documentation now but Iām pretty useless with emacs lisp#2016-07-2008:43reefersleep@zane @kasuko In my case, it would be a great feature to be able to turn on and off. I mostly work in hiccup these days, so I would prefer my default vector indentation to be the alternative to the norm š I don't require the normal one, really#2016-07-2008:43reefersleepUntil I do, off course, but then it would be excellent to be able to toggle back and forth#2016-07-2011:16reefersleepThird question (hehe :D): Is there a lisp mode command for moving an s-expression past the next s-expression?#2016-07-2011:17reefersleepFor example:
[(sexp-a) (sexp-b)]
^pointer here
hit move-forward command
result:
[(sexp-b) (sexp-b)]
#2016-07-2012:51Chris OāDonnell@reefersleep there is SPC k t#2016-07-2012:51Chris OāDonnellbut your pointer would need to be at the beginning of the second sexp#2016-07-2013:28reefersleep@codonnell: that works great, but I wonder why there isn't an option to do it the other way? Since we're working on AST representations and those representations often take the shape of flat lists, I wonder why it isn't deemed a basic need to be able to switch the pointed element back and forth in the list. I've had use for it more than once, upon entering arguments in the wrong order š#2016-07-2013:28reefersleepbut thanks!#2016-07-2013:30Chris OāDonnellno problem. If that's functionality you're really after, you might be able to just write that function yourself#2016-07-2013:31Chris OāDonnellFor example, someone here pasted a snippet that overrides SPC k w to be more clojure friendly (wish I'd written down who to give them credit)#2016-07-2013:31Chris OāDonnell;; make wrapping friendly to Clojure/Pixie/Hy
(with-eval-after-load "evil-lisp-state"
;; undef SPC k w so we can generalize it
(evil-leader/set-key "kw" nil)
;; wrap using SPC k w ([{
(evil-leader/set-key "kw("
(lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "(")))
(evil-leader/set-key "kw["
(lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "[")))
(evil-leader/set-key "kw{"
(lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "{"))))#2016-07-2013:34reefersleepoooooo#2016-07-2013:35reefersleepnice!#2016-07-2013:35reefersleepI'm completely new to emacs-lisp, but I'd like to give it a go if I get the time#2016-07-2013:35reefersleepThanks!#2016-07-2013:39Chris OāDonnellyou're welcome#2016-07-2017:41akivaSpamming multiple channels with this but itās good stuff: https://github.com/tonsky/FiraCode#2016-07-2109:14lazy-lambdacider-jack-in opens the repl in :headless mode. Is there a way to make it open the repl in a buffer and not in :headless mode?#2016-07-2114:19bja@lazy-lambda I think that's what https://github.com/clojure-emacs/inf-clojure is for#2016-07-2114:19lazy-lambda@bja: Thanks, I will check that out š#2016-07-2115:37zaneHave you gotten it working for Spacemacs? It locks mine up.#2016-07-2115:38zaneError in post-command-hook (aggressive-indent--indent-if-changed): (error "Attempt to shape unibyte text")
#2016-07-2115:38zane@akiva: ^#2016-07-2115:41akiva@zane, I did, following the instructions here: https://github.com/tonsky/FiraCode/wiki/Setting-up-Emacs#2016-07-2115:41zaneOh, I didn't see the mention of that error! Sorry. Thanks for pointing it out.#2016-07-2115:42akivaNot a problem. In the table on the FiraCode page, it mentions that āstandalone Emacsā doesnāt work. I brew the OS X version and use it in graphical mode rather than launching it from zsh.#2016-07-2210:59reefersleepIs there a general consensus that ligatures are good? I find them superfluous and occasionally confusing as they obscure what's actually underneath.#2016-07-2211:06reefersleepAlso, redundant diareses. Ugh. I read some article where the author added diareses to everything, such as naĆÆve, and I'm like, - why do you want to make your language even more complex? And unnecessarily so, in my opinion, as everyone already knows the regular spelling of the words and (often) would be perplexed on reading the words - is there a reason that the author spells this word in such a weird way? Do they mean to imbue special meaning in this word or sentence? But maybe I just feel that way because English is my second language.#2016-07-2211:07reefersleep(The latter issue does not apply to FiraCode, it's more of an extended rant really : )#2016-07-2212:04akivaThereās no general consensus; some people like them, some donāt.#2016-07-2508:43reefersleep@akiva so, I take it that you are in the "like them" group š How come, in your case? Aesthetics, readability, both or other?#2016-07-2512:10akivaMost aesthetics. It certainly has no measurable effect on my productivity and Iām not suddenly finding easy algorithms and data structures that ordinarily would require a more careful analysis simply because the typeface is more decorative.#2016-07-2618:06aganyone has problems with connecting to repl from CIDER? nrepl--direct-connect: [nREPL] Direct connection failed
#2016-07-2618:08wagjoMy modeline trims line and column numbers when I have multiple windows. Is there a way to move that segment to the left, so it's not the first one that's clipped?#2016-07-2618:30agI rolled back to using Emacs 24, Maybe that was the problem, anyone using 25, do you have any issues with nrepl?#2016-07-2618:45mahinshawI am using 25 rc1 and I havenāt had any issues today#2016-07-2807:18hkjelsIām getting this error-message:
elisp
Symbolās value as variable is void: projectile-go-function
Iāve downloaded a fresh copy of spacemacs and even replaced my config with the default template and the problem persists. Anyone else seeing this issue?#2016-07-3008:37hkjelsAfter updating today the problem I mention above was resolved#2016-08-0315:12akiva@hkjels, Iāve learned that that is actually a common occurrence: packages seem to get uploaded without thorough testing. I know some Emacs guys who have been around a long time and they defer updating packages until they absolutely must. Just to avoid these sorts of problems.#2016-08-0315:13akivaFor awhile there, updating packages was the first thing Iād do with Spacemacs every morning until stuff started dismantling itself here or there. Now I do it weekly (which is my compromise between my natural urge to have the latest version of everything and not wanting to have to deal with creeping breakages).#2016-08-0315:39chrisyep, this is super common, unfortunately#2016-08-0315:39christhankfully the fixes usually also come out quickly#2016-08-0317:07agyeah, I have this stupid habit of updating things first thing in the morning. Now if I feel the urge, I usually scroll through #C09C8GRLY Gitter channel and make sure nobodyās been screaming in agony for the past few hours#2016-08-0317:09akiva@ag, probably a good idea. I should probably hang out on that channel too.#2016-08-0317:10agit feels quite noisy at times. a lot of newcomers. which is a good thing#2016-08-0419:29hkjels@akiva: I see. Iāll be more careful from now on#2016-08-0503:17porglezompIāve had some trouble with every clojurescript setup Iāve tried with Spacemacs and live reloading. What do you all do in terms of getting nREPL working with a live reloader? (With either of boot or lein)#2016-08-0512:31akiva@porglezomp, do you mean something like Figwheel?#2016-08-0520:29porglezomp@akiva: Yeah, like Figwheel, but Figwheel and nREPL is an āadvanced configurationā that broke on me last time I tried to set it up. Right now Iām using the boot reloader, but that also seems to break after a while, and start claiming that variables are undefined right before successfully evaluating them.#2016-08-0520:31akivaAh, Iāve been using Figwheel successfully for a long time through Leiningen. Itās pretty solid now.#2016-08-0520:32akivaI donāt use nREPL with it, though. I keep a separate REPL going for connecting to Spacemacs. I just keep Figwheel humming for CLJS stuff only.#2016-08-0520:34eggsyntaxI struggled to get a good figwheel + in-editor cljs repl going (> 1 yr ago, things may have improved, and actually that was with vim+fireplace), and eventually (based on a recommendation from the figwheel author) starting treating the browser as my REPL, and I've been pretty happy with that ever since.#2016-08-0520:35eggsyntaxSo if I want to eval something, I just add it to the cljs file I'm working on, hit save, and get the answer in the console. Def not as nice as using a clj repl, but it works ok.#2016-08-0520:35eggsyntaxAlthough I've also had good luck more recently with cider + cljs + figwheel.#2016-08-0520:36eggsyntaxBut it's nice to know you can abandon the struggle without losing too much š#2016-08-0603:25mahinshawI use figwheel through cider-jack-in-clojurescript daily. There are some useful steps here: https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl#integration-with-emacscider#2016-08-0603:27mahinshawAlso, I have a .dir-local.el and set (cider-cljs-lein-repl . "(start-figwheel)ā) where start-figwheel is what starts my cljs connection. The function lives in the user namespace, which is also the init ns for my repl.#2016-08-0816:19chriscider-jack-in-clojurescript with those instructions is so much better than the byzantine setup I had#2016-08-1207:24hkjelsSo, Iām having trouble passing clojurescript code to the correct REPL from an org-mode file#2016-08-1207:24hkjelsAnyone else tried it?#2016-08-1303:53gowder@hkjels: no, but if you have literate org-Babel stuff going with cljs I would love love love to see your config. Been meaning to figure out how to pull that sort of thing off#2016-08-1308:06hkjels@gowder: that's the thing, I'm not able to throw stuff at the Clojurescript-REPL, but tangling and reader-conditionals work, so you can test most of your code on the clojure REPL without any issues#2016-08-1308:09hkjelsI'm doing a talk for my co-workers next week, so the document etc will be available on github some time before Tuesday.
https://hkjels.github.com/persuade/#2016-08-1312:54akivaIām actually going to look into literate programming via org-mode. Saw a video from a gentleman at Thoughtbot and it looked interesting.#2016-08-1316:51gowder@hkjels sweet! I know some folks are doing amazing stuff with clojure in org mode#2016-08-1906:24twashingDoes anyone know the function in Spacemacs that lists out all the functions in a namespace (Clojure or Elips)?#2016-08-1906:24twashing⦠help-fns.el is a built-in function. And help-fns+ looks like a package that augments those functions.#2016-08-1907:12twashingAh nevermind, I found it⦠Itās a cider command cider-browse-ns#2016-08-2313:04reefersleepSometimes, neotree conks out and stops responding to any commands, such as delete file, open file in horizontal split, and simply open file. Anyone else have ny experience with this? I think it occurs when I try to use neotree and other commands at the same time, such as rgrep.#2016-08-2313:05reefersleepI can still toggle neotree open/close, but that's about it.#2016-08-2316:12zaneIs there a way to clear the projectile cache?#2016-08-2316:15zaneNever mind, found it! SPC p I!#2016-08-2316:18chrisalso, sending the prefix arg before you use SPC p f clears the cache before it searches#2016-08-2316:18chrisso SPC u SPC p f#2016-08-2318:12alandiperton that note, does anyone know how to supply an actual prefix argument in spacemacs?#2016-08-2318:14chrisitās SPC u when in normal mode and C-u in insert or emacs mode#2016-08-2318:16chrisspacemacs seems to convert SPC u to C-u silently, so use SPC u the same way you would C-u in regular emacs#2016-08-2614:05reefersleepSometimes I have set up a wonderful set of buffers, for example 6 windows split up in vertical pairs, where I can compare in two dimensions - lovely! But then, I stupidly press some random key combination, and order spacemacs to make one (maybe completely different buffer) take up all of my screen space. My lovely constellation of open buffers is gone! Is there a way to retrieve previous constellations?#2016-08-2614:06eggsyntaxIf you've maximized the window, doing maximize again (SPC-w-m) will bounce it back to how it was.#2016-08-2614:08reefersleepThank you @eggsyntax , that helps a lot! I wonder if there is a general solution to my question, though?#2016-08-2614:08reefersleep(Only asking because spacemacs tends to surprise me by having implemented already what I discover I need along the way : )#2016-08-2614:09eggsyntaxThere's a layer I've experimented with, can't recall the name, that seems like it would provide a general solution to saving/managing layouts, but I couldn't get it to work very well for me š#2016-08-2614:09eggsyntax<looks for name>#2016-08-2614:09reefersleepAh dang, thanks though. I will have a look š#2016-08-2614:10reefersleepManually nudging windows around gets a bit tedious.#2016-08-2614:10reefersleepAnd frankly a bit embarrasing when you're trying to show people stuff in your code š#2016-08-2614:11eggsyntaxI think spacemacs-layouts was the one (https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Bwindow-management/spacemacs-layouts) but I'm only about 80% sure.#2016-08-2614:11reefersleepIt's good to know that someone's been working on the problem, even if it isn't solved.#2016-08-2614:12eggsyntaxIf you find a good general solution, I'd really love to know about it -- it'd be a huge win, and I just haven't quite had the impetus to go through another round of trying yet š#2016-08-2614:12reefersleephehehe, I will make a note of it!#2016-08-2614:13eggsyntaxAh, yeah, spacemacs-layout is included, accessed through SPC-l. Pretty sure that was in fact what I tried.#2016-08-2614:20akiva@reefersleep, you want SPC w u for winner-undo.#2016-08-2811:35reefersleep@akiva: Exactly what I desired, as I expected! Thank you very much! š#2016-08-3117:18thebearmayorI switched my emacs to emacs-mac-port from homebrew, which also switched it to v25, and the mac shortcut for paste (command-v) doesnāt work. Anybody know what caused that?#2016-08-3117:19eggsyntaxI just switched to v25 this morning & noticed that <CMD 1> <CMD 2> etc werenāt working to switch windows. Havenāt tried <CMD-v>, I rarely use it.#2016-08-3117:20eggsyntaxNo, <CMD-v> still works for me.#2016-08-3117:22eggsyntax(I installed via brew install emacs --HEAD --use-git-head --with-cocoa --with-gnutls --with-rsvg --with-imagemagick)#2016-08-3120:07thebearmayorhm, ok. Iāll try that to compare.#2016-08-3120:08eggsyntax@thebearmayor -- I have found a few other little glitches; so far no deal-breakers.#2016-08-3120:10thebearmayorI really love homebrew#2016-08-3120:10thebearmayorso convenient#2016-08-3120:35thebearmayoralright, I have my old shortcuts back. I think I switched to emacs-mac to get prettier modeline separators, but I really donāt care about that.#2016-08-3120:36thebearmayorthanks @eggsyntax !#2016-08-3120:48eggsyntax:thumbsup:#2016-08-3120:48eggsyntax@thebearmayor out of curiosity, do the CMD-number-keys work for you to switch windows?#2016-08-3120:49eggsyntaxI've also lost CMD-p and CMD-n for prev/next input in the CIDER REPL.#2016-08-3120:49thebearmayorno, only SPC <number>#2016-08-3120:50eggsyntaxGotcha. Did CMD-<number> work for you before, do you know?#2016-08-3120:51thebearmayorI didnāt know about that shortcut, so I canāt say.#2016-08-3120:52eggsyntaxNot that any of these matter, I can rebind as desired. I have found a bit of a nasty glitch in the last hour, that certain things cause it to hang with a blinky cursor for a second or two -- not consistently replicable, but I've seen it on # for 'find previous instance', and on a couple of <SPC-something> menu-opens.#2016-09-0318:55eggsyntax@thebearmayor -- I eventually figured out that the core issue for me was that the CMD key had been bound back to Super instead of Meta. Fixing with:
(setq mac-option-modifier nil)
(setq mac-command-modifier 'meta)
#2016-09-0319:05akivaThereās an osx layer, too, which you can use to address issues like that.#2016-09-0319:18eggsyntax:thumbsup:#2016-09-0319:20eggsyntaxI found a solution slightly faster on SO than by glancing at the readme for the OSX layer, so I went with that š#2016-09-1309:05reefersleepI made a commit on master, switched branches in order to cherry-pick and realized that the branch I was on was not master. I did all of this in magit. Is there a way to see my magit command history?#2016-09-1309:05reefersleepIn order to find the branch I made the commit on š#2016-09-1311:11andrewvidaYou could try checking out the reflog. SPC-g, l, r#2016-09-1312:53reefersleepCheers @andrewvida, I think this was what I was hoping for. Do you know a good source on what exactly the reflog entails? (I know I can google sources, but I really appreciate references to good sources š )#2016-09-1312:53reefersleepJust if you happen to know one off-hand.#2016-09-1317:28andrewvida@reefersleep I always default to the git site or man pages. https://git-scm.com/docs/git-reflog#2016-09-1407:50reefersleep@andrewvida: Cheers, I'll have a look.#2016-09-1615:28jeff.terrell@reefersleep - A little late, but $ in the magit status buffer will show you your command history.#2016-09-1908:09reefersleep@jeff.terrell: I think that this was exactly what I was looking for, cheers! (I figured out my branching problem just after asking my question, so no worries there :))#2016-09-1908:10reefersleepBut the functionality of remembering command history is exactly I've desired before as well!#2016-09-2109:01reefersleepNeotree regularly breaks for me, with Spacemacs - I can open the tree, but I cannot open buffers for files with <enter> or -, I cannot create new files etc . Sometimes I fix it by opening and closing Neotree a couple of times (SPC p t, SPC p t), but other times, nothing seems to fix it save for a complete restart of Emacs. Am I the only one who has experienced this?#2016-09-2117:28ag@reefersleep don't use neotree... it's a source of sorrow. There are plenty alternatives. I myself moved to direx.#2016-09-2119:03eggsyntaxAnother data point -- I've been using neotree for maybe 4 months, it's worked fine for me. The one exception: if I open a neotree window in another frame, SM gets confused when I try to close the 1st one.#2016-09-2207:07reefersleepWell thank you. I think Neotree has been confused when I've tried to use other stuff while it was open, as well - rgrep or magit, for example. Better move on, then!#2016-09-2207:11reefersleep@eggsyntax @ag is there another alternative readily available in Spacemacs? The wealth of stuff already there is awesome, but also difficult to get an overview of.#2016-09-2207:17reefersleepOr maybe there is an easy way to incorporate something not there, like direx? I'm still an emacs newb.#2016-09-2209:38kurt-yagramFrom line 4 in the file:
#:ns{:kw1
...
:kw2
...}
Using clojure 1.9 map namespace syntax. (http://clojure.org/reference/reader#_maps)#2016-09-2213:17eggsyntax@reefersleep I mostly use SPC-p-h and do search-based file opening; I only use neotree when I explicitly want to look at the directory structure. helm also has some built-in directory-style navigation like helm-find-files.
In terms of other file navigation libs, I haven't tried any. If you find one that has a spacemacs package, you can just add the package name to dotspacemacs/layers in .spacemacs. If you find one that doesn't, you can try adding it to dotspacemacs-additional-packages, and maybe it'll just work. If it doesn't, you'd have to create a spacemacs package, which doesn't sound too hard, but I haven't done it myself.#2016-09-2213:18eggsyntax@kurt-yagram is your project using 1.8 or 1.9?#2016-09-2213:59kurt-yagram1.9#2016-09-2214:10reefersleepThanks a lot, @eggsyntax ! I think I'll try to make use of those first approaches you mentioned before attempting a different navigation lib.#2016-09-2214:11eggsyntaxYeah, I only turn to the ones at the end if there's something I really want.#2016-09-2217:10ag@reefersleep this is a sample layer how your direx setup may look like: https://gist.github.com/agzam/9bb878b476d6291e79ee8d9acd9de8e4#2016-09-2220:10jasonjcknsome of my clojure :variables in my spacemacs config layer are ignored after I upgraded to latest emacs and latest spacemacs#2016-09-2223:10ag@jasonjckn maybe try setting them in with-eval-after-load? whatās broken?#2016-09-2322:23jasonjckn@ag cool thanks, yah I did something similar to that and it fixed it#2016-09-2322:23jasonjckn@ag don't know why :variables didn't do the trick, oh well#2016-09-2611:43reefersleepThank you, @ag, I may try it out if the basic options turn out to be insufficient š#2016-10-0314:15eggsyntaxBig changes (some breaking) in v0.200:
http://spacemacs.org/news/news01.html#2016-10-0315:56bjareading that and got to 2.1 (dropping emacs 24.3 support) and had to do a quick alt+tab, SPC SPC emacs-version#2016-10-0315:56bjasafe for now#2016-10-0320:29kasuko@bja if you could do SPC SPC emacs-version then that must mean you already updated before you checked the emacs-version ⦠living on the edge! š#2016-10-0320:53bjayeah, I realized after I read through the doc that I have been on develop for awhile#2016-10-0400:34agyeah that strange feeling - when you see everyoneās excitement about changes, that not really news for you, since youāre on develop and have been using those goodies for long time#2016-10-0515:06kurt-yagramHowto? I've got 2 windows, one with a repl, and containing an ordinary file. The behaviour of spacemacs now seems to be: if you delete the buffer with the file, the window is closed as well, leaving you with 1 window, i.e. the repl.
I'd prefer if I delete the buffer with the file, the window it is contained in is not closed, but loads, well, the 'previous' buffer (like spacemacs behaves when you have 2 windows each containing one file).#2016-10-0516:51agif you use spacemacs/kill-this-buffer or SPC b d it should keep windows configuration intact#2016-10-0516:51agalso I prefer to bury-buffer instead of killing it#2016-10-0516:58mahinshaw@kurt-yagram Itās important to not that the behavior you mention is a vim behavior, not a spacemacs behavior. So if you use the :bd command, you will get the vim (evil-mode) behavior.#2016-10-0519:15kurt-yagram@ag @mahinshaw Ah, ok, thanks, makes sense. Got it.#2016-10-0713:53reefersleepI'm trying to rebase my branch onto master in magit, and I hit a spot where some other party deleted a file that I have committed an edit to. Magit stops the rebase and tells me to fix it. I now have the file marked under "Staged changes" as "umerged <filename> (deleted by us)". How do I proceed? I just want to choose their version (delete the file).#2016-10-0714:00reefersleepThink I found a way - x on the file gives me a prompt to use ours, theirs or something else.#2016-10-2020:50aghey guys⦠how do I enable eldoc-mode? doesnāt seem to be working#2016-10-2020:57jasonjckndunno if this helps#2016-10-2020:57jasonjckn;;(remove-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode)
;;(add-hook 'cider-mode-hook #'eldoc-mode)#2016-10-2021:01agwhere this gotta be#2016-10-2021:01ag?#2016-10-2021:02agjust evaluating it and re-jacking didnāt seem to be changing anything#2016-10-2021:02agand I wonder if this works in both clj and cljs#2016-10-2021:56jasonjcknI put that in (defun dotspacemacs/user-config ()#2016-10-2021:56jasonjcknafaik the latest spacemacs + clojure layer + clojure mode has eldoc enabled by default with no configuration needed#2016-10-2021:57jasonjcknI use to require ;;(remove-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode)
;;(add-hook 'cider-mode-hook #'eldoc-mode)
but only for older versions#2016-10-2904:29keatondunsfordHey yāall. š Just starting the Spacemacs ABC tutorials on YouTube right now to get even better. For some reason SPC SPC isnāt working for me to jump to words in the current buffer. Was this removed at some point after this series, or did I just mess up my keybindings somehow?
Thanks!#2016-10-2905:21mathpunk@keatondunsford: It became the keybinding for calling an emacs function by name#2016-10-2905:21mathpunk@keatondunsford: Not having used the jumping words function you're describing, I'm not sure where that went#2016-10-2907:03ag@keatondunsford SPC SPC long time ago has become alias for M-x which is awesome. Function youāre looking for is on SPC j j now#2016-10-2917:37zaneWhen I start up Spacemacs I get a warning that it can't find tern, but tern is in /usr/local/bin and /usr/local/bin is in my exec-path. :thinking_face:#2016-10-2917:40zaneAha. https://github.com/syl20bnr/spacemacs/issues/7497#2016-10-3018:13gowderSoooo.... I assume someone on here has figured out the right tweaks to/on top of the clojure layer to hook into figwheel? :-)#2016-10-3019:03ag@gowder what exactly are you trying to do? Do you want to run figwheel when ājacking-inā? Do you want two repls - CLJ and CLJS?#2016-10-3019:40gowder@ag: I'd be happy with just an option to jack into a running figwheel repl as an alternative to the normal clj repl#2016-10-3019:40ag@gowder you can you cider-connect to connect to a running repl, but youād lose some clj-refactor functionality#2016-10-3019:41aghowever if you have a script (similar to a sass-script) described in figwheelās wiki, you can do something like this:#2016-10-3019:43ag((nil . ((cider-lein-parameters . "do clean, repl :headless")
(cider-cljs-lein-repl . "(start) (repl)"))))
if you put this into dir-locals.el of your project - whenever you run cider-jack-in-clojurescript it will run the second thing and youād have 2 independent repl bufers - one for Clojure. another for Clojurescript#2016-10-3020:27gowderOoh nice. Thanks @ag !#2016-10-3022:50zaneIs there a way to get cider nREPL buffers to be in the current perspective on launch?#2016-10-3103:34ag@zane use cider-connected-hook with persp-add-buffer#2016-10-3103:35agthis should be pretty trivial to do. Good idea I may just do it in my own config#2016-11-0113:36eggsyntax"Emacs has flickered for 30 years. Now, it should be flicker-free. Iāve just landed support for double-buffered rendering for the X11 port." (https://www.facebook.com/notes/daniel-colascione/buttery-smooth-emacs/10155313440066102/)
Anyone know whether that would apply to mac versions of emacs? I definitely have some flicker problems on my spacemacs.#2016-11-0116:13naomarik@eggsyntax the HN thread had a link to this https://bitbucket.org/mituharu/emacs-mac where apparently he solved it for mac awhile ago#2016-11-0116:14eggsyntaxCool, thanks.#2016-11-0116:14naomariklemme know if itās better than what youāre using#2016-11-0116:14naomariki donāt notice any problems with my build, but could be ignorant#2016-11-0116:14naomariksometimes it freezes though, but not super often#2016-11-0116:15eggsyntaxI've been investigating further, and am fairly sure the problem I'm having isn't the same "flickering" he's talking about. I do already use emacs-mac, and I've been pretty happy with it, IIRC I did notice an uptick in performance.#2016-11-0116:16naomariki think iām using a brew version from a long time ago#2016-11-0116:16eggsyntaxI suspect I have an installed package that's causing problems. The problem's intermittent, so I'm currently doing a painfully slow bisect on my dotfiles repo to try to figure out where it was introduced.#2016-11-0116:17naomarikd12frosted/emacs-plus/emacs-plus#2016-11-0116:17naomarikah#2016-11-0116:17eggsyntax^ That's the one you're using? I believe the spacemacs author used to recommend that one, but now recommends emacs-mac#2016-11-0116:17naomarikyeah i havenāt updated it since i got my mac#2016-11-0116:18naomarikusing the latest spacemacs though#2016-11-0116:21eggsyntaxThis comment from last June is at least one place where he seems to be recommending emacs-mac, unless I'm misreading it: https://github.com/syl20bnr/spacemacs/issues/1114#issuecomment-111232491#2016-11-0117:21keatondunsfordCurious general question: How many of yāall came from dev using Cursive to Spacemacs, or how many of you have left Spacemacs for Cursive? Iām curious as to a comparison between the two. I love Spacemacs keybindings so much:) But a lot of people seem to be using Cursive for production builds.#2016-11-0119:06naomarikiād like to know this as well: especially for people who using cursive after spacemacs. Personally I donāt really see why I would use anything other than spacemacs after a few years with vim background. I donāt just code clojure, so having something that is useful for everything is better imo. I donāt feel like itās lacking anything.#2016-11-0119:07naomarikbut Iām open minded and would like to see what cursive has that currently isnāt in spacemacs/cider#2016-11-0119:09naomarik@eggsyntax the official repo https://github.com/syl20bnr/spacemacs#macos still says to get what i have#2016-11-0119:09naomariki refuse to upgrade to sierra though š#2016-11-0119:09naomarikdonāt want no siri#2016-11-0119:09naomarikand emojis#2016-11-0119:09eggsyntaxIf I were doing mainly cljs development, I think Iād definitely take cursive for a spin. In my experience, certain combinations (eg boot + cider + wanting to have both clj and cljs repls in spacemacs) end up not working as well as Iād like.#2016-11-0119:10naomarikwhat probs you have with clj + cljs?#2016-11-0119:10naomarikthey work fine for me with both repls spun up#2016-11-0119:11eggsyntax@naomarik that link I posted says thereās a PR to update the README re: emacs-mac, but on the other hand that was June 2015...#2016-11-0119:11eggsyntaxclj + cljs worked like a charm for me in cider as long as I was using lein. After we switched to boot it kinda went downhill.#2016-11-0119:12naomarikwhat you experience exactly?#2016-11-0119:12naomarikfor me i can eval forms just fine#2016-11-0119:12naomarikand cljc files i have to explicitly set clojurescript mode for it to swtich to cljs repl#2016-11-0119:13eggsyntaxItās been a while, but as I recall it was problems with a) spacemacs slowing way, way down after a while with repls into the project, and b) issues with spacemacs sending code evals to the wrong repl.#2016-11-0119:13eggsyntaxItās also possible that itās a problem specific to our codebase, but if so, no oneās yet been able to identify it.#2016-11-0119:14naomarikiām normally connected to frontend/backend in dev at same time and donāt notice either of those probs#2016-11-0119:14naomarikthe only issue is if emacs freezes i have to restart everything#2016-11-0119:14naomarikcause it doesnāt leave the running repl in a state i can just reconnect to it#2016-11-0119:15naomariki also have a topend 2015 macbook pro 15 though so most things are fast...#2016-11-0502:04lvhHi š#2016-11-0502:04lvhIāve just tried to get started with spacemacs#2016-11-0502:04lvhusing vim mode#2016-11-0502:05lvha lot of muscle memory is broken especially around paredit#2016-11-0502:08eggsyntaxie you're used to paredit, and spacemacs' variant of it is disorienting?#2016-11-0502:09eggsyntaxYou may want to see https://github.com/syl20bnr/spacemacs/issues/1812 ā spacemacs author gives useful tip on how to make spacemacs use regular paredit.#2016-11-0516:22lvheggsyntax: so, e.g. I had C-k as hybrid-kill-sexp#2016-11-0516:22lvhd$ is not, similarly, what I want#2016-11-0516:22lvhthose evil commands seem to be blissfully ignorant of sexps#2016-11-0516:34eggsyntax@lvh SPC-k will show you most of the sexp-modifying commands that have a default keybinding.#2016-11-0516:36eggsyntaxTyping SPC-: will bring up a window where you can type partial commands by name & see what matches. Typing sexp there will bring up most of the other sexp-modifying commands, including ones that are not yet bound.#2016-11-0516:36eggsyntax& of course you can establish a keybinding for any command you like.#2016-11-0516:37eggsyntaxI also sometimes use other vim commands rather than true sexp commands, eg da( to delete an sexp.#2016-11-0516:40eggsyntaxNote that calling a sexp-modifying command will leave you in evil-lisp-state, with a pink cursor, which means that you can type any of the other sexp-modifying commands without the SPC-k prefix, ie theyāre available as single keystrokes.
See here for more info on evil-lisp-state: http://spacemacs.org/doc/DOCUMENTATION#editing-lisp-code#2016-11-0516:42eggsyntaxIncluding sexp-navigation, eg once youāre in evil-lisp-state, H and L will navigate to previous/next sexp.#2016-11-0516:47eggsyntaxSPC-m (or, for me at least, ,) will bring up another set of commands having to do with evaluating sexps, sending them to a REPL, etc.#2016-11-0519:12lvhThanks! Thatās very helpful š#2016-11-0712:24danielstocktonDid the indentation toggle change in recent spacemacs? space + m + T + i is not longer defined#2016-11-1015:13lvhIn spacemacs, how do I wrap an expr in [] or {} or #{}#2016-11-1015:13lvhSPC k w seems to only be about parens#2016-11-1015:14lvhI know I can do it with [ SPC k s#2016-11-1015:14lvhbut that seems weird#2016-11-1015:15eggsyntaxThere may be a more standard way, but I highlight it in visual mode and then do s ] or s } or...you can use the left-bracket equivalents, but that'll add a space.#2016-11-1015:16lvhthat seems to do it on a letter, not a sexp#2016-11-1015:17eggsyntaxIt'll do it with anything, whatever you've got highlighted in visual mode.#2016-11-1015:17lvhah, right, ok#2016-11-1015:17eggsyntaxYou can do eg v a ( to highlight a sexp#2016-11-1015:18eggsyntaxIs it obvious I come from vi-world here? š#2016-11-1015:18lvhhm, is there a way to get actually-a-sexp#2016-11-1015:18lvhspecifically, in the sp hybrid style, which would include, say, symbols#2016-11-1015:19lvhI know I can get o to get a symbol; Iām just not used to thinking of the exact thing Iām selecting#2016-11-1015:19lvhbut rather used to being good at traveling to it#2016-11-1015:19eggsyntaxProbably š. I just don't bother for wrapping.#2016-11-1015:19lvhgotcha#2016-11-1015:19eggsyntaxExcept, as you say, SPC k w to wrap in another sexp#2016-11-1015:20lvh[ and ] seem natural extensions givne that ( and ) exist#2016-11-1015:21eggsyntaxAgreed -- but since they're less important in non-clj lisps, maybe the authors didn't think about them? Purely guessing there.#2016-11-1015:21eggsyntaxI didn't know about [ SPC k s, I may try to start using that.#2016-11-1015:22eggsyntaxOh, one handy tip -- there's a way to get SM to recognize that, eg foo-bar-baz is a single word in lisp-land. I can dig that up if you'd like to add it.#2016-11-1015:26lvhoh, I hadnāt even ntoiced that yet#2016-11-1015:26lvhbut yeah#2016-11-1015:26lvhI typed cw today#2016-11-1015:28eggsyntax;; Use clojure-based definition of words
(with-eval-after-load 'clojure-mode
(dolist (c (string-to-list ":_-?!#*"))
(modify-syntax-entry c "w" clojure-mode-syntax-table )))
#2016-11-1015:29eggsyntaxThat's a variation on the lisp one because of minor differences -- if you use other lisps you may want that one too (but I don't have it)#2016-11-1015:32eggsyntaxHuh, [ SPC k s isn't valid for me...is there a typo in there?#2016-11-1015:33lvhyeah itās more like#2016-11-1015:34lvh[#2016-11-1015:34lvhESC#2016-11-1015:34lvhl#2016-11-1015:34lvhSPC k s#2016-11-1015:34lvhwhich is why itās so annoying š#2016-11-1015:38kasukoI know this doesnāt directly solve your problem, but for the exact purpose of wrapping stuff easier is why I installed the evil-cleverparans layer and havenāt looked back. Now to wrap I just use M-( to wrap a single sexp or 2 M-( to wrap 2 sexps etc. This also works with M-[ and M-{ I also like the other keybindings too.#2016-11-1015:38kasukohttps://github.com/syl20bnr/spacemacs/tree/master/layers/%2Bvim/evil-cleverparens#2016-11-1016:19malch@lvh also use evil-cleverparens layer, very nice#2016-11-1016:19lvhawesome š#2016-11-1016:19lvhthanks!#2016-11-1016:22eggsyntaxOoooh, didn't know about that one -- @malch no problems/conflicts with SM's built-in layer? (smartparens IIRC)#2016-11-1016:24malchwell, I turned off paredit and lispy completely (used them before)#2016-11-1016:26malchevil-cleverparens supports most of the paredit functionality (same about smartparens, I guess)#2016-11-1016:27malchand by most I mean all that I need simple_smile#2016-11-1016:27eggsyntaxGotcha, so it's an alternative rather than a supplement. Thx!#2016-11-1016:27malchanyway, should be really easy to try#2016-11-1016:27malchnp#2016-11-1016:34kasuko@eggsyntax I havenāt disabled any smartparens settings and I havenāt had any issues.#2016-11-1017:23bjaI use this for wrapping: ;; make wrapping friendly to Clojure/Pixie/Hy
(with-eval-after-load "evil-lisp-state"
;; undef SPC k w so we can generalize it
(evil-leader/set-key "kw" nil)
;; wrap using SPC k w ([{
(evil-leader/set-key "kw("
(lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "(")))
(evil-leader/set-key "kw["
(lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "[")))
(evil-leader/set-key "kw{"
(lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "{")))
(evil-leader/set-key "kw\""
(lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "\""))))
#2016-11-1017:33bjaI also define SPC m e o as a generic eval operator and SPC m s o as a generic send operator and then hook into the mode-specific eval-region (cider's is cider-eval-region). This lets me eval motions. Then I redefined all of the SPC m s and SPC m e eval and send stuff in terms of the generic eval and send so that they are consistent across emacs lisp, python, and clojure#2016-11-1017:35bjait's a bit verbose, but for one-off evals it's much easier to SPC m e o % on an opening or closing paren, while keeping the ability to eval a buffer, a line, etc and not think about shortcuts, just the normal evil building blocks#2016-11-1017:36bjaI think it's a bit crazy that every spacemacs language layer has a slightly different set of eval/send functionality and at different keybindings#2016-11-1017:38bjathen you get to say stuff like ;; Enable highlighting of the area to be eval'd
(define-eval-sexp-fu-flash-command emidln//generic-eval-region
(eval-sexp-fu-flash (cons beg end)))
#2016-11-1017:39bjaand suddenly all of your languages get fancy results overlays#2016-11-1020:36eggsyntaxre: evil-cleverparens which is so cool it makes my jaw drop (because of course the way to handle sexps for vimmers is to make them ordinary text objects), there's a pre-existing spacemacs layer for it:
https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Bvim/evil-cleverparens#2016-11-1020:41eggsyntax(For anyone to whom that isn't immediately clear, I suggest https://yanpritzker.com/learn-to-speak-vim-verbs-nouns-and-modifiers-d7bfed1f6b2d )#2016-11-1021:49jasonjcknlove evil-cleverparens#2016-11-1021:51jasonjckn@eggsyntax is your dot spacemacs posted anywhere?#2016-11-1021:53eggsyntax@jasonjckn Not at the moment -- it's a mess for sure, & includes some stuff that I haven't been able to get to work. I'm still a semi-noob at emacs & emacs lisp. But I'd be happy to share it with you if you'd like.#2016-11-1021:53eggsyntaxIt's at least fairly well commented.#2016-11-1021:54jasonjcknsure, if you have any interesting hacks, maybe I could learn from it#2016-11-1021:54jasonjckn(with-eval-after-load 'clojure-mode
(dolist (c (string-to-list ":_-?!#*"))
(modify-syntax-entry c "w" clojure-mode-syntax-table ))) seems to not work quite right, when I hold "w" in normal mode the cursor sometimes gets stuck at a closing parens and makes no more forward movements.#2016-11-1021:55eggsyntaxWeird. I didn't write that, I stole it. Lemme see if I can find a link.#2016-11-1021:56eggsyntaxLooks like I stole it from here: https://timothypratley.blogspot.com/2014/08/clojure-friendly-word-definitions-in.html
(note the 1st comment)#2016-11-1022:00eggsyntax@jasonjckn here's my .spacemacs -- for anyone who looks at it, please be aware that a) it's a mess, b) there's broken stuff in there, and c) I'm still an emacs & emacs lisp noob. But it's at least commented.#2016-11-1022:00jasonjcknthanks @eggsyntax#2016-11-1022:44jasonjckn@eggsyntax many great hacks in there thatkns#2016-11-1022:44jasonjckn@eggsyntax i'm also dvorakian š#2016-11-1023:12eggsyntax@jasonjckn if itās obvious to you why any of the broken things are broken, let me know š#2016-11-1602:35zaneI've started getting this warning:
(Spacemacs) Warning: Auto-evilication could not remap these functions in map `archive-mode-map':
- `archive-chgrp-entry' originally mapped on `G'
#2016-11-1602:35zaneNot sure what's causing it. Anyone have insight?#2016-11-1602:36zaneI don't have anything referencing arc-mode in my .spacemacs, which is what archive-mode-map is from.#2016-11-1603:02alandipert@zane I just fixed recently in my config, 1 sec#2016-11-1603:02alandipertIt's because you're on emacs 26 probably#2016-11-1603:05alandiperthttps://github.com/alandipert/dotfiles/commit/451d294a2e5ffc08503fd984593a4390aaddbfba#2016-11-1603:05alandipertGive that a whirl#2016-11-1614:40zaneThanks @alandipert. I'm on 25.1.1 for what that's worth.#2016-11-1614:48zaneThis bug report is in inspiring me to pepper my future bug reports with emoji.#2016-11-1614:58alandipertoh, weird. still curious to know the scoop#2016-11-1618:28agoh⦠cool I didnāt know @alandipert uses Spacemacs š Did you convince Micha too to abandon Vim?#2016-11-1618:34alandiperthe used it for a year and then switched back to vim#2016-11-1618:35eggsyntax@alandipert that seems like a pretty uncommon reversion. Do you recall what motivated him to switch back?#2016-11-1618:44ag@micha you should definitely give it another chance. Spacemacs is a lot more stable now. I am a die-hard Vim fan, yet even I have discovered - Emacs is better Vim than Vim#2016-11-1620:17eggsyntaxHey @micha! So what motivated you to switch back to vim?#2016-11-1621:11michaheyo!#2016-11-1621:11micha@eggsyntax i tried to like emacs, i gave it like a year#2016-11-1621:12michathe main thing that didn't work for me was managing buffers really#2016-11-1621:15michaalso vim feels faster and lighter, which i like (i don't use any complex plugins, only really simple ones and not too many of them)#2016-11-1621:19eggsyntax@micha Cool, thanks!#2016-11-1716:18kasuko@zane I am also having that issue and I am on Emacs 24.5.1#2016-11-1803:02lvhHas anyone noticed magit being ridiculously slow, for some reason only in spacemacs?#2016-11-1803:06lvhTakes SPC g s about 2s of drawing-thread-blocking, which is really annoying.#2016-11-1804:11lvhWhatās the preferred way to wrap something in paired delimiters, like quotes or parens? I think I can get evil-modeās visual mode to select it, although W seems to overshoot by also grabbing the space at the end#2016-11-1804:12lvhvWgS does something totally weird; like add newlines#2016-11-1804:14lvhLooks like that might be the S part#2016-11-1804:20lvhv/, almost works, except it includes the comma#2016-11-1804:23lvhI have something like
SESSION_TOKEN = os.environ.get(AWS_SESSION_TOKEN)
⦠and I want to wrap the AWS_SESSION_TOKEN in double quotes.#2016-11-1804:25chrisin that specific instance I would do vi(sā#2016-11-1804:31lvhI guess that works; I didnāt start out with the parens though#2016-11-1804:31lvhbut I guess I can put the parens in first#2016-11-1804:31lvhI was kind of hoping that the was a UPPER_SNAKE_CASE word object#2016-11-1804:32lvhalso, I dunno if you know python but I have some lines that come with a default#2016-11-1804:32lvhSECRET_ACCESS_KEY = os.environ.get(AWS_SECRET_ACCESS_KEY, "SOME_SECRET_ACCESS_KEYā)
#2016-11-1804:32lvh(so going for the paren pair doesnāt work)#2016-11-1804:58chrisoh sorry, I misunderstood. there are a few things that could work#2016-11-1804:59chrisfor one, there is an āargumentā text object which is a plugin in vim but built into spacemacs#2016-11-1805:00chrisfor info on how to use it http://blog.carbonfive.com/2011/10/17/vim-text-objects-the-definitive-guide/#2016-11-1805:01chrisanother thing you can do (what Iāve done for certain major modes like clojure) is redine what a word is#2016-11-1805:02chrisfor example, in clojure there are many things named like name-of-function so dia na|me-of-function gives you -of-function#2016-11-1805:03chrisif you redefine the hyphen as a part of a word instead of a word delimiter you can treat the whole thing as one word instead of messing with WORD which can cause other problems like in the example you showed#2016-11-1805:03chrisIām not sure if this would be wise for python because I donāt really use it too much, but it is an option#2016-11-1808:01reefersleep@lvh: For wrapping in paired delimiters, I first enter them (for example ""), then put the point on the second delimiter, SPC k s to slurp#2016-11-1808:01reefersleepI write Clojure, though, so our modes may differ š#2016-11-1810:21naomarikis there a way to keep smart parens from toggling itself off when completing something with yassnippet?#2016-11-1810:21naomarikfor instance when i autocomplete a let smartparens gets toggled off#2016-11-1814:28lvh@chris Yeah the word redefinition makes sense; I think a similar thing would work well for Python as well#2016-11-1814:28lvh@reefersleep Thatās how I used to do it with regular emacs#2016-11-1814:30reefersleep@lvh are you hungry for a more efficient solution? š#2016-11-1814:31lvhNope; just trying to learn š#2016-11-1814:31reefersleepbtw, I notice the magit lag too, but I've only ever tried spacemacs, so I have no comparison. ~1 second to render for me#2016-11-1814:31lvhyeah#2016-11-1814:31lvhItās instant in regular emacs#2016-11-1814:31lvhI think it might be the powerline#2016-11-1814:31lvhIāll profile it#2016-11-1814:32reefersleepcool!#2016-11-1814:32lvhbtw, how do I show the current available commands in lisp mode?#2016-11-1814:32lvh? is unavailable#2016-11-1814:32lvhh is movement#2016-11-1814:32lvhSPC is unbound#2016-11-1814:32lvhsame goes for visual mode I guess#2016-11-1814:32chrisF1-m#2016-11-1814:33chrisif Iām understanding what youāre asking#2016-11-1814:33chrisyouāre asking about bindings right?#2016-11-1814:34lvhoh boy f1#2016-11-1814:34lvhthis is where I get confused by my new touch bar#2016-11-1814:35lvhf1 does appear to be the thing, thanks š#2016-11-1814:48chris(defun modify-lisp-syntax ()
(modify-syntax-entry ?- "w")
(modify-syntax-entry ?_ "w"))
#2016-11-1814:49christhatās how Iāve changed word. this changes both the hyphen and the underscore#2016-11-1814:49chrisand itās bound in a few different lisp hooks (clojure, elisp and racket iirc)#2016-11-1820:02PBSo I feel like an absolute idiot, but it seems that paredit mode isntā enabled by default and I have to set it on each buffer. What is the correct way to do this (my first day using spacemacs)#2016-11-1821:26christhe paredit that comes with spacemacs is smartparens and you enable it by adding hooks#2016-11-1821:27chrisso (add-hook āclojure-mode-hook āsmartparens-mode)#2016-11-1921:22zaneWhen I launch Spacemacs I get the warning:
Warnings:
- tern binary not found!
however
$ which tern
/usr/local/bin/tern
and
exec-path is a variable defined in āC source codeā.
Its value is
("/usr/local/bin/" ā¦)
#2016-11-2008:53malch@zane https://github.com/syl20bnr/spacemacs/issues/5993 maybe? š#2016-11-2114:47zane@malch, if you read that thread it's about not having the exec-path set up correctly.#2016-11-2114:47zaneThat's not my issue.#2016-11-2114:48malch@zane sorry, must have misread it#2016-11-2115:48zaneNo worries! Appreciate the effort.#2016-11-2119:26kasukoHey, when I switched to Spacemacs I was coming from Vim and moving to Emacs for the first time so I just picked the vim editing mode. Now that I am getting used to Spacemacs a little more I am interested in trying Hybrid mode and seeing what itās like. However I am a little at loss at what is different between evil insert mode, and emacs mode. Is there anywhere that this is explained?#2016-11-2415:43reefersleepI've accidentally "folded in" one of the files I was viewing in magit diff, so now I can only see the name of the file, not my actual changes for it. I can see the other file I've edited just fine. Does anyone know how to fold the file changes back out?#2016-11-2421:01mitchelkuijpersDoes anyone know how to add extra shortcuts to spacemacs? I recently switched to vim bindings from using emacs bindings for 2 years and i really mis my cider-eval-ns-form. I thought it would be something like this:
(spacemacs/set-leader-keys-for-major-mode m "en" cider-eval-ns-form)
but emacs does not even to find the cider-eval-ns-form var#2016-11-2421:06mitchelkuijpersFigured one thing out the cider-eval-ns-form should be quoted.. lol#2016-11-2514:27PB@chris Sorry I didnāt actually see your reply, smartparens doensāt give me what I want when it comes to manipulating parens. WHen pressing M-x i can see paredit is installed. I just canāt for the life of me have it enabled on every buffer by default#2016-11-2519:57rgmhi all, is there an equivalent of say vim splitjoin that I just can't quite figure out the name of in spacemacs? For example...#2016-11-2713:22reefersleepI would like for lines to soft-wrap in org mode. I've tried adding (setq org-startup-truncated nil) to (defun dotspacemacs/user-config () in my .spacemacs, to no avail. Does anyone know what I should do?#2016-11-2723:34aghey guys⦠anyone using Spacemacs in os x? For whatever reason when I jack-in, CIDER makes everything soooooo slow lately. anyone has the same experience?#2016-11-2800:30agigao@ag The same here. Iāve switched to IntelliJ + Cursive#2016-11-2801:13ag@chokheli nope - been there. not an option for me.#2016-11-2802:54agigao@ag when you solve the problem please let me know :)))#2016-11-2820:34mahinshaw@ag What specifically slow for you. I have noticed some editing has become slow. Not sure its necessarily related to cider, but I would like to know.#2016-11-2821:43ag@mahinshaw strange, I switched to Emacs 26 and it kinda feels better. I havenāt yet seen issues I saw yesterday#2016-11-2821:46mahinshaw@ag Is 26 the dev branch?#2016-11-2821:47agyeah, I installed emacs-plus with āHEAD#2016-11-2821:48mahinshawah. Iāll give that a try#2016-11-2821:55ag$ brew tap d12frosted/emacs-plus
$ brew install emacs-plus āHEAD
$ brew linkapps emacs-plus
#2016-11-2917:52naomariki havenāt noticed any issues personally#2016-11-3008:40jstaffansyou might want to try monroe instead of cider, if you can live without the refactoring tools: https://github.com/sanel/monroe#2016-11-3008:41jstaffans(I havenāt tried it myself though)#2016-11-3009:34reefersleepthat pinhead thumbnail is a bit foreboding...#2016-11-3009:46romain@ag is it better with -HEAD ? I remember some bugs with spacemacs and emacs 26#2016-11-3010:25steven_thi guys, I reinstalled spacemacs today frsh after not using it for a while, but now the helm menu seems strange.#2016-11-3014:23steven_tit is a new reported bug of which-key.#2016-11-3014:24steven_tI managed to download the latest and used package-install-file to install it#2016-11-3022:03lvhis it bad if my first thought was āwow Microsoft has really gone too far now with the forced windows 10 upgrades"#2016-11-3023:40naomarikitās really annoying actually#2016-11-3023:40naomariki did some policy update to disable it#2016-12-0304:33gowderI haven't been having any cider issues.#2016-12-0304:34gowderalso, for fellow figwheel/spacemacs beginners, I just wrote up a quickie blog post summarizing the easy way to bring them together (mostly drawn from figwheel docs, but simplified for clarity): https://paultopia.github.io/posts-output/figwheel-emacs/#2016-12-0517:45PBSo⦠I have noticed that paredit seems to be installed. But if it werenāt. How would I install it on spacemacs?#2016-12-0517:45PBParedit is probably the biggest thing for me and I donāt really like smartparens#2016-12-0517:52alandipert@petr i also came from paredit, ended up just learning and using smartparens as they come via SPC k#2016-12-0517:52PBSPC is the leader key?#2016-12-0517:53alandipertwell, i'm in evil mode#2016-12-0517:53alandipertbut i think, in holy mode, you can call sp-use-paredit-bindings#2016-12-0517:53PBOh?!#2016-12-0517:53alandiperthttps://github.com/Fuco1/smartparens/wiki/Working-with-expressions#2016-12-0517:53alandipertfrom https://github.com/syl20bnr/spacemacs/issues/627#issuecomment-138036491#2016-12-0517:54alandipertmaybe worth a shot. don't know personaly if it's a real alternative#2016-12-0517:54PBMy issue with sp bindings in spacemacs is that there doesnāt seem to be any#2016-12-0517:54PBSo barf forwards/backwards seems to be a M-x sp-barf-blahblah command#2016-12-0517:55eggsyntaxThey're all under SPC-k#2016-12-0517:55eggsyntaxSo eg SPC-k-b to barf forward#2016-12-0517:56alandipertyeah the actions have simlar descriptions to paredit functions, slurp/barf etc#2016-12-0517:56eggsyntax(although there are some that aren't bound, of course)#2016-12-0517:57eggsyntaxHeh, I came in in the middle, I see I'm just repeating the stuff Alan already said. Never mind, carry on š#2016-12-0517:58PBHmmm, I guess the other annoying thing is when I kill a line, it deletes the parens too#2016-12-0517:58PBHow do you live with that?!#2016-12-0518:00eggsyntaxYou can do kill-sexp. Although I usually just do delete around parens with d a (#2016-12-0518:01eggsyntax& of course you can bind kill-sexp to whatever you like.#2016-12-0518:01alandiperti bind custom things under SPC o, which is reserved for user. would recommend#2016-12-0518:02PBHmmm ok#2016-12-0518:02alandiperthttps://github.com/alandipert/dotfiles/blob/master/dotfiles/spacemacs#L416-L419#2016-12-0518:02PBDamn you evil users#2016-12-0518:03PBHaha I just want paredit back#2016-12-0518:06PBSo I see magit is also installed? How do I get that? I donāt see anything in M-x#2016-12-0518:06eggsyntaxBelieve you need to activate it.#2016-12-0518:07eggsyntaxAdd git to your dotspacemacs-configuration-layers in .spacemacs#2016-12-0518:08eggsyntaxThat's off the top of my head, though.#2016-12-0518:12PBHmmm ok. So SPC is not the same as M-x it seems#2016-12-0518:13PBM-m#2016-12-0518:13alandipertSPC SPC =~ M-x#2016-12-0518:14eggsyntax@alandipert maybe that's custom? For me SPC SPC is avy-word.#2016-12-0518:15alandipert@eggsyntax it changed recently#2016-12-0518:15alandipertmaybe it's changed back now, not sure, haven't updated in a few weeks myself#2016-12-0518:15eggsyntaxAh, OK, I've been trying to troubleshoot a SM problem, so I'm fairly behind on updates.#2016-12-0518:16alandipertok yeah, https://github.com/syl20bnr/spacemacs/blob/master/CHANGELOG.org#02000-20161002 is when it changed#2016-12-0518:18eggsyntaxWow, I'm more behind than I realized š#2016-12-0519:44naomarikthere a way to specify which file types to search with helm-ag? ie when pressing SPC /#2016-12-0522:16mahinshaw@naomarik: it takes ag options. So "-Gclj my file" where "clj" is a regex. If your not using ag, you will have to check the man page for that tool. #2016-12-0602:45naomarik@mahinshaw brilliant, thank you so much!#2016-12-0915:31zaneIs there a way to get SPC j i and SPC j I to show namespaces as well as names?#2016-12-1417:39zaneWhat is the right way to create a layer for a package that's in a package repository rather than ELPA?#2016-12-1417:49mahinshaw@zane Take a look at https://github.com/quelpa/quelpa#2016-12-1417:50mahinshawItās used in a few places in spacemacs#2016-12-1417:54zaneAh, I see it in the docs too.#2016-12-1417:54zaneThanks!#2016-12-1418:12zaneIs there a trick to using spacemacs/set-leader-keys-for-major-mode?#2016-12-1418:13zaneThis doesn't work:
(spacemacs/set-leader-keys-for-major-mode 'clojure-mode
"zz" 'sayid-trace-ns-by-pattern
"zx" 'sayid-get-workspace)
but this seems to
(spacemacs/set-leader-keys
"zz" 'sayid-trace-ns-by-pattern
"zx" 'sayid-get-workspace)
#2016-12-1418:27ag@zane I think you have to wrap this in with-eval-after-load āclojure-mode#2016-12-1418:27zaneAha! ok#2016-12-1418:27zaneLet me try that.#2016-12-1418:28zaneI tried evaluating it by hand with , e e after clojure-mode was already loaded, which didn't work.#2016-12-1418:31zaneHuh. That works but it appears to be binding the functions to , z z and , z x. Is that expected, @ag? I would have expected them to be bound to SPC z z and SPC z x.#2016-12-1418:36zaneAh, it appears that
> Spacemacs uses SPC o as a reserved prefix for user-specific bindings, and SPC m as a prefix for bindings that are specific to the major mode (filetype).
https://www.reddit.com/r/emacs/comments/3qffbu/spacemacs_using_two_leader_keys/#2016-12-1418:51ag@zane as I far as I know you cannot change SPC etc mappings to work differently for different modes, which totally makes sense#2017-01-0900:17vinnyataidehello, why spacemacs doesnt use paredit by default?#2017-01-0907:15jsoo1something about evil mode i imagine?#2017-01-0914:57alandiperti would imagine because smartparens does similar thing, but works for more modes#2017-01-0914:58alandiperti make do with smartparens and i haven't figured out how to use paredit instead. but i imagine its probably better, for lisp#2017-01-1013:36practicalli-johnnyI use smartparens in strict mode and haven't noticed anything missing that I would have gained from paredit. To me, smart parens in strict mode in spacemacs is effectively paredit.
dotspacemacs-smartparens-strict-mode t#2017-01-1014:25alandipert@jr0cket didn't know about strict mode, thanks for the pointer#2017-01-1014:27practicalli-johnny@alandipert there are a couple of smart parens configuration options in the ~/.spacemacs file (nicely documented too)#2017-01-1014:27alandipertCool š#2017-01-1018:38nikkiHave people used parinfer / would you recommend it?#2017-01-1112:55practicalli-johnny@nikki: I have tried parinfer with Nightcode editor and although it looked promising I found that it quickly became annoying. Suggest parinfer is something you need to invest a bit of time in getting used to and making the most of. I didn't seen any benefit over smartparent, which I use in many languages / modes in Spacemacs.#2017-01-1115:21naomarikyesterday I discovered the most useful shortcut everyone probably knows i wish I knew months ago , g g for jump-to-definition so much time wasted without this#2017-01-1115:22eggsyntaxg d also works for me, & saves one keystroke. Possible that's one I set up myself, but I don't think so.#2017-01-1115:24eggsyntax@nikki seconded on @jr0cket's comment re: investment. parinfer is cool, and IMO saves keystrokes, but it will break all kinds of stuff if you haven't really learned all conventions in advance. ie not a good one to just turn on & start messing around, at least not on code that you're actively working on.#2017-01-1115:25eggsyntax(speaking from painful experience š )#2017-01-1115:26naomarik@eggsyntax i came across this https://clojurians-log.clojureverse.org/clojure/2016-09-23.html while wanting to disable print-namespace-maps myself#2017-01-1115:26naomarikdid you ever figure it out?#2017-01-1115:26naomarikalso didnāt know about g d, even better!#2017-01-1115:27eggsyntax@naomarik hopping to PM since it's not spacemacs-related#2017-01-1115:59nikki@jr0cket @eggsyntax thanks for the advice! will play w/ it and see#2017-01-1221:06leoThere is some way to use jump-to-definition and find-usages without running REPL?#2017-01-1221:08eggsyntaxNot that I've found. It seems like you should be able to do something with ctags, but I haven't tried that approach.#2017-01-1314:47chris@leorog you can redefine it to use dumb-jump instead#2017-01-1314:47chrisbut itās dumb so who knows how well itāll work#2017-01-1314:48chrisit definitely works inside the file but across a project idk#2017-01-1314:48chrisat best itāll work across open buffers#2017-01-1318:25leo@chris good to know, thanks#2017-01-1501:33alandiperti googled clojure ctags and a bunch of interesting things popped up#2017-01-1615:05PBI canāt get over that you canāt use paredit š#2017-01-1615:05PBSmartparens isnāt nearly as good#2017-01-1716:15bjacouldn't you just exclude smartparens and then require paredit?#2017-01-1716:15bjait wouldn't integrate with the rest of spacemacs default keybindings because they assume everyone is on smartparens, but spacemacs still is emacs after all#2017-01-2305:23rishatDear channel, I just recently started learning Spacemacs and I have a question. Say, I have this code:
(->
abc
def)
Now, I want to swap last two lines so it becomes
(->
def
abc)
Is there a single command for that? I was trying to guess by the name (`SPC ?`), but so far nothing helpful has popped out, but still, I have strong feeling that it could be done.#2017-01-2309:45reefersleep@rishat: Try sp-transpose-sexp (I had trouble finding it as well : ) with SPC k t (whilst standing on the latter of the items you want to swap)#2017-01-2316:31jamieorcI want to change the default background color of spacemacs-light theme. Where/how to do that?#2017-01-2316:57alandipertspc spc customize-themes iirc#2017-01-2316:57alandipertat least, that's the old emacs way. don't know if there's a cool spacemacs alternative way#2017-01-2317:17jamieorcthanks, Alan,. Iām digging spacemacs mostly, but keep getting lost in the emacs pit of trying find the way to do a simple change#2017-01-2317:20alandipertcool. it's a pit, but also a powerful pit#2017-01-2317:20alandiperti like spacemacs partly because it's 'just emacs' underneath, with all the craziness if you need it#2017-01-2317:21jamieorcIāve been in and out of emacs for 17 years, Spacemacs is the first rational version Iāve seen, lol#2017-01-2500:38jamieorcEditors such as Textmate and Atom have a command such as ālist symbolsā in file that allow one to pop up a list of symbols in current buffer, such as the ruby methods in it, and use fuzzy completion to select the symbol and go to it. Does Spacemacs have this? I canāt find it if it does.#2017-01-2501:04potapenkoSPC s s ādefnā? š#2017-01-2502:45zane@jamieorc, does SPC j i (and its cousin SPC j I) do what you want?#2017-01-2503:51jamieorc@potapenko yeah, I discovered that yesterday, but not quite the same thing#2017-01-2503:53jamieorc@zane cheers! Thatās the one. I canāt believe I didnāt see it. Do you know if thereās a way to not display the filename in the results? totally pointless when Iām searching the file#2017-01-2503:55jamieorcoh never mind, thatās not the filename, thatās the class name#2017-01-2503:57jamieorcAnother question: I have a custom bg1 color for spacemacs-light theme, but I donāt know how to set it for just the light theme. If I switch to dark, itās got that bg color. What syntax do I use to switch on light/dark theme?#2017-01-2510:49practicalli-johnny@jamieorc as spacemacs theme is a package, to tweak the theme I simply hacked it, making a copy first and putting my changes into version control. So long as the Spacemacs theme package is not updated, my changes stay. Its a terrible hack and I should create my a package for my own theme instead
I just wanted to change the dark theme background (to be fully black), so edited .emacs.d/elpa/spacemacs-theme-20160909.445/spacemacs-common.el and changed the values in defun create-spacemacs-theme.#2017-01-2512:17shanAnyone know if there is better diff highlighting for when tests fail?#2017-01-2513:40alandipert@zane you changed my life with your SPC j magicks#2017-01-2513:49zaneI know, right @alandipert? They should advertise that feature more! š#2017-01-2514:50jamieorcGlad I asked about it š#2017-01-2514:52jamieorcI didnāt even notice the SPC j I last night. That is one awesome feature#2017-01-2515:41alandipertoh man - with SPC j I i lashed together a ctags-like situation#2017-01-2515:42alandipertgood for projects with small # of files anyway, based on https://emacs.stackexchange.com/a/625#2017-01-2515:42alandipertdo SPC u SPC SPC dired and set the ls switches to -alR#2017-01-2515:42alandipertthen in the dired buffer % m to mark all .*.clj files, then run dired-find-marked-files to open them all#2017-01-2515:43alandipertthen use SPC j I to search through all the defs in the project š#2017-01-2515:46eggsyntaxI missed the original discussion, but FWIW I just use g d for evil-smart-goto-definition & it works fine for me, at least in clj. Less so with cljs, IIRC, although it's been a fair while since I've tried it w/ cljs.#2017-01-2516:00shaneggsyntax: nice, I had been using SPC-m-g-g for definition jumping#2017-01-2516:02eggsyntax:thumbsup:#2017-01-2515:47alandipertthat's an awesome one too, SPC j I/i is more of a fuzzy search thing#2017-01-2515:47alandiperta slightly smarter grep#2017-01-2515:47eggsyntax:thumbsup:#2017-01-2515:50alandipertumm you guys? SPC j I/i works in markdown too swoon#2017-01-2515:55alandiperthm, anyone know why prefix cmd wouldn't work with a spacemacs key binding? or if there is a way to fix?#2017-01-2515:55alandipertie SPC u SPC SPC dired works, but SPC u SPC a d does not#2017-01-2515:57eggsyntaxThe latter is a custom one you're adding?#2017-01-2515:58alandipertit's in there already i think#2017-01-2515:58alandipertie SPC a d is analagous to M-x dired#2017-01-2515:58alandipertseems like something is lost across the spacemacs binding of it#2017-01-2515:58eggsyntaxI seem to recall having to do something different to add SPC-based key bindings. Lemme see if I can find it. How are you trying to set it?#2017-01-2515:59alandipertwell i'm not adding anything, at this point#2017-01-2515:59alandipertto test: if you do SPC u M-x dired you get a prompt to set the ls switches#2017-01-2515:59eggsyntaxOh, ok. Nevermind, then š#2017-01-2515:59alandipertno such prompt with SPC u SPC a d#2017-01-2515:59alandipertnp, i'll snoop around#2017-01-2516:00alandiperti may just need to add my own SPC o ... binding to call dired directly with prefix arg#2017-01-2516:00eggsyntaxI'm not quite clear on what you're saying, I think, but I get this with SPC u SPC a d:#2017-01-2516:01alandipertright - now try SPC u M-x dired#2017-01-2516:02alandipertnvm - apparently it just doesn't work http://spacemacs.org/doc/FAQ#why-does-helm-m-x-spc-spc-not-accept-the-prefix-argument#2017-01-2516:02eggsyntaxAh#2017-01-2516:02alandipertactually that's a slightly different thing, but i'm satisfied not to keep diggin lol#2017-01-2516:02jamieorctoday is the first day I can actually use Spacemacs instead of Atom for my Rails work, thanks to SPC j i, and , g g among others. Dang#2017-01-2516:10shan@jamieorc if you're in evil mode you can use g d instead of , g g (thanks @eggsyntax )#2017-01-2516:10jamieorc@shan thanks, I just started using that š#2017-01-2516:11shanI was actually using SPC m g g before š
#2017-01-2516:11jamieorcis it possible to scroll past top like with bottom? I lock my line to middle of screen and would love it to work at top of file too#2017-01-2516:11jamieorcdāoh!#2017-01-2516:12shannever used that myself#2017-01-2519:56eggsyntaxJust updated for the first time in a good while to 0.200. Good lord, lots of changes.
Has anyone here made the helm-to-ivy switch? If so, how has that been? Or if you've decided you're not going to switch, why not?#2017-01-2520:52bjaI haven't investigated it. I've been running develop for a year. helm hasn't angered me enough to even consider other things. Is there a particular reason you're considering the switch?#2017-01-2520:55eggsyntaxRelease notes for 0.200 had the line "Helm has a new friend in this release, it is called ivy and it has more and more adopters." Looked into it slightly, & it sounds like it's significantly faster (I do notice helm being somewhat slow). But mostly just curious.#2017-01-2520:55eggsyntaxAt this point leaning toward sticking w/ helm, though, since it also sounds like it would involve learning some new workflow, & I'm not dissatisfied with helm.#2017-01-2520:56alandiperti hope spacemacs becomes more stable over time#2017-01-2520:56alandipertui churn is the worst#2017-01-2520:56alandiperttho i did the .200 update a month or two ago and survived#2017-01-2520:57eggsyntaxVery happy to say that that seems to be their plan. <searches for quote>#2017-01-2520:57alandipertwhew#2017-01-2520:57eggsyntax"For 0.201 we plan to introduce stable snapshots of elpa repositories, a new installation of Spacemacs will always install packages from this stable source. Users will then be able to manually trigger an upgrade of packages if they want the bleeding edge versions but they will always be able to rollback to the previous stable state if required." (sec 4.1 of "what's new")#2017-01-2520:58eggsyntaxAlthough maybe you meant "stable" in a somewhat different sense.#2017-01-2520:58eggsyntaxPersonally my favorite would be if SM did something like long-term-support releases.#2017-01-2520:58eggsyntaxSo I could only change once a year or so.#2017-01-2520:58alandipertyeah i want the bugfixes but not the new keybindings#2017-01-2520:58eggsyntaxyep#2017-01-2521:04bjaHuh, maybe my system is making up for helm being slow.#2017-01-2522:44jamieorcOne of the weird things about using Spacemacs in spacebar mode is that many modal windows want emacs key combinations and then my hands get confused. I would rather have them operate the same and use āesc, escā to get out. Just for consistency.#2017-01-2612:46chris@jamieorc: iirc this is generally considered a bug if there are modes that are in emacs state by default. spacemacs is supposed to evilify the bindings as much as it can by default.#2017-01-2612:47chris(assuming youāre using the vim config)#2017-01-2612:47chrisI would write up an issue if there are modes that are doing this for you#2017-01-2615:12jamieorc@chris thanks#2017-01-2617:28bjaBased on @alandipert's comments from the last few days, I ended up macro'ing SPC p f .*.clj M-a RET to open all the files in my clojure project and now SPC j I completes and jumps to any def in my project. Thanks!#2017-01-2622:52jamieorcdo any you know how to enable fuzzy code completion?#2017-01-2714:20jamieorcAlso, how to make a search in buffer case sensitive?#2017-01-2719:22chrisyou need evil-ex-case-search, the default is smart#2017-01-2719:22chrisor there is likely an equivalent for emacs mode#2017-01-2719:23chriscompany-flx exists, although Iāve never used it so ymmv#2017-01-2719:24chrishttps://github.com/PythonNut/company-flx#2017-01-2719:46agdoes anyone use indirect buffers? so when I try to edit code in indirect buffer, it suddenly highlights all parens in the parent buffer. and I donāt know how to clear that#2017-01-2719:49agit does sometimes clear that automatically, sometimes it gets stuck#2017-01-2719:51eggsyntaxI do occasionally, don't recall having that problem. You might try evil-search-highlight-persist-remove-all, whatever that's bound to for you (I use : for it...maybe it's ; by default?)#2017-01-2719:57agI donāt think itās evil-search-highlight⦠it lights up ALL parens, like the forms are horridly corrupt. I donāt ever see such thing since I have strict parens enabled, but with indirect buffers it happens. strangely I couldnāt reproduce it in emacs-lisp mode. but in clojurescript and clojure it does shit like that ;(#2017-01-2719:57eggsyntaxWeird.#2017-01-2822:43eggsyntaxAlthough the spacemacs documentation has a whole section on layouts and workspaces, I've never been able to get any of that to work very well for me. However! Despite the fact that "desktop" is mentioned nowhere in the documentation, adding the following to my user-config:
(desktop-save-mode 1)
(desktop-read)
has now changed the config so that whenever I quit spacemacs and restart, it resumes with the same arrangement of frames windows and files that it had when I quit.
<sigh of relief>#2017-01-2822:43eggsyntaxPossible caveat: I use spacemacs in server/client mode; if you don't, YMMV.#2017-01-3016:49ag@eggsyntax initially I was opposed to the idea of using layouts and eyebrowse, but they turned out to be extremely nice, especially when you have to manage multiple projects. Just start with pressing SPC l ?#2017-01-3017:01eggsyntax@ag yeah, I did that. I took several stabs at going that route over the last year, and could never get it to work very well. I wonder whether it plays poorly with using emacs in server/client mode. Or maybe I just misunderstood something, who knows? I'll stick with desktop since I finally have a solid working solution.#2017-01-3017:03ag@eggsyntax maybe because layouts broke a lot in the past months. I recently started using workspaces as well, they turned out to be handy as well.#2017-01-3017:04agthe only thing that I still strongly feel I donāt need is purpose. That I have disabled and never tried again.#2017-01-3021:44aghas anyone updated packages lately, did cider-jack-in got broken? Or itās something wrong on my machine?#2017-01-3022:34akivaI update packages regularly but use cider-connect due to the fact that Spacemacs sometimes crashes on me.#2017-01-3022:35akivaI did use cider-jack-in the other day and it seemed fine.#2017-01-3102:05agactually I got help in #cider channel. I was able to fix my issue#2017-04-0301:11donyormdoes anyone here new the convention for spacemacs on "bumping" PRs if they haven't been addressed? Mine has fallen off the front page (and doesn't seem to be being addressed), but I don't want to be obnixous about bringing attention to it.#2017-04-0314:52practicalli-johnnyI assume a gentle mention in the https://gitter.im spacemacs channel of your PR may help gain support. If people also add a "thumbs up" reaction to your PR on Github then that helps maintainers see which are the most popular PR's to include next#2017-04-0417:54jamieorc@jeff.terrell. For example, typical GUI editors have had much more obvious and interactive search/replace features forever. Cmd-Shift-f and I get a dialog to search. In atom, I have a row to limit the search to a folder. I can interactively decide how to construct the search: regex, case-sensitive, etc. I can interact with the results, for example collapse all results with one click and just see file names. I can change the replace value and it shows me what the changed result would be. Itās not that Emacs and VIM, etc donāt have powerful search and replace features, they have more powerful ones than Atom. Itās that with Atom, Textmate, etc, you just do the obvious thing and can see immediately how to do all of things. Iāve spent loads of time in Emacs trying to discover how to do the same thing that is obvious in Atom and the others.#2017-04-0417:56jamieorcThe other thing is tabs. Emacs has Tabbar, but itās not really there. I like tabs as they are an overview of what Iām working on. I rearrange them often as I am working. I constantly look at them to orient myself. People who donāt use tabs like this will never understand those of us who do and will continue to lecture the rest of us about how we should learn not to use tabs. š#2017-04-0417:59jamieorcAtom has some good concepts and implementations, but many bad ones, too. For example, why are config files lists instead of functions that return lists? It means you have to write all this config you might more easily have programmed. Or write a program to make the list, so now you have a couple steps. Plugin key commands stop all over other pluginās commands. Itās a mess.#2017-04-0418:46ag@jamieorc Emacs offers a lot more powerful ways to search, replace and navigate through the code. Although not very obvious for the beginner. For example you can search for a term in a project/file/region/multiple folders, then open the search results in a buffer and edit them to your liking.#2017-04-0418:59agwhen it comes to Tabs - yes, Emacs does not offer very good way to handle that, almost every newbie tries to get tabs in Emacs. As it turned out you donāt really need tabs - they are distracting and then again - Emacs really has a lot better ways to navigate the code#2017-04-0420:57jamieorc@ag tabs are distracting to you. Did your read what I said about them? Itās a serious bias "that not having tabs is better". Iāve tried both ways many times. I find organizing around tabs to be both my preference and very effective the way I use them. I feel lost and slow when I donāt have them when working in a project. I find this bias that "Emacs really has a lot better ways to navigate the codeā incredibly condescending.#2017-04-0421:05jamieorcAll Iām arguing wrt search is that it would be beneficial if there was a find/search/replace in emacs that had more of the obvious features up front without having to dig through a bunch of docs to figure out and then forget a week later. š#2017-04-0421:06jamieorcI wish I had the time to build the stuff into emacs Iād like. I just donāt. Itās powerful as hell, but a bitch. I think Spacemacs has made huge leaps forward for Emacs.#2017-04-0421:06ag@jamieorc Trust me - I felt exactly like that and even maybe angrier when I started using Emacs, I needed tabified interface, I needed tree-view, etc. People kept telling me, but I wouldnāt believe. I personally tried many different IDEs and editors, and switching to Emacs didnāt happen for me in a day or weeks. It took me months. I agree - things in Emacs are not so obvious and not very discoverable and hard for the beginners.#2017-04-0421:07jamieorcThereās a reason so many Vim users have come over to EVIL and Spacemacsāthe power of the platform#2017-04-0421:07jamieorcIāve used Emacs on and off since 2000.#2017-04-0513:42jeff.terrell@jamieorc - Thanks for writing up your thoughts. :-) Yeah, I agree, it's not always very easy in emacs to figure out how to do those sorts of things. I think Spacemacs' menu system helps a lot, but it still isn't as beginner-friendly as a point-and-click GUI in some cases.#2017-04-0513:44eggsyntax@ag as a long-time vimmer I often just fall back to vi/ex commands to do quick search and/or replace, ie / for search and %s/foo/bar/ for search & replace.#2017-04-0514:25jamieorcLast night I forked spacemacs, moved my dir Iād been using since end of the year and started overākeeping my .spacemacs file. Somewhere since then, I can not get it to have any other background color than blackāand Iām not setting it to black any where. Looking for guidance. I also switched to ivy and canāt seem to find any docs on configuring it#2017-04-0519:52ag@eggsyntax ex-commands are totally dope. hereās the full list#2017-04-0520:28eggsyntax:thumbsup:#2017-04-0520:31eggsyntaxI've recently been trying to switch a few of my habits over to spacemacs-native commands just for the sake of less-taxing keystrokes (my pinky finger takes a lot of abuse), eg SPC f s instead of shift-;-w-enter to save a file. But I still use plenty of ex cmds.#2017-04-0608:22reefersleepI foolishly did a git reset --hard without saving uncommitted work. Afterwards, I hoped that Emacs/Spacemacs could save me through some sort of undo/history/backup functionality, but I failed to find a solution. Now I read that Emacs keeps backup files (ending with ~) around by default, and, since many users are annoyed by them, they can be turned off... I've never noticed such backup files. Does Spacemacs generate backup files by default, and if so, where can I find them? And if not, is this some functionality available to me in Spacemacs that I can turn on somehow?#2017-04-0613:47eggsyntax@reefersleep It's always generated them for me (without me messing w/ relevant settings), in the same dir as the files. foo.clj becomes .foo.clj.~undo-tree~.#2017-04-0613:47eggsyntaxundo-tree-visualize should get you into it (`SPC a u`, at least for me).#2017-04-0614:01rustam.gilaztdinovHello, guys! I want to walk through java source code of clojure, but seems to spacemacs canāt do it. Anyone solved this issue?#2017-04-0708:03reefersleep@eggsyntax cheers, this was one of the things I tried to get my work back - but I didn't succeed. Not sure why, because I'm not at that computer at the moment. But an important note was that I hadn't worked on that particular file for months, it had just been laying there in my work dir, uncommitted. I don't know when undo tree files are deleted, maybe it had already been removed by emacs in my case.#2017-04-0708:07jumar@rustam.gilaztdinov Unfortunatelly, I wasn't able to navigate to the source of clojure's java classes (e.g. clojure.lang.PersistentVector): cider-find-var responds with "No source location". However, this works for JDK classes like "java.util.ArrayList"#2017-04-0708:17reefersleepFound a thread regarding "persistent undo" a la vim, which is exactly what I was looking for. Will have do delve deeper into this once I get back to my personal computer š#2017-04-0708:36reefersleephttps://github.com/syl20bnr/spacemacs/issues/774#2017-04-0713:09eggsyntax@reefersleep ah, yeah, I do have undo-tree-auto-save-history set to true; I'd forgotten that. That's probably what's causing the difference in behavior.#2017-04-0713:10reefersleep@eggsyntax neat. Do you know what the limits are for that? Does it just naively persist all of your history?#2017-04-0713:12jumar@reefersleep if you need to get back some data after git reset --hard you might wanna look at git reflog#2017-04-0713:14reefersleep@jumar that was my first attempt, but I didn't succeed. When you use the reflog to jump to an earlier point in time, that "point" does not contain uncommitted/unstashed files... Or so it seemed to me. Am I wrong?#2017-04-0713:14clojerCan anyone help with this error: WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.3.0-SNAPSHOT (package: 20170126.118) and n/a, respectively.#2017-04-0713:14clojerI have [refactor-nrepl ā2.3.0-SNAPSHOTā] in ~/.lein/profiles.clj#2017-04-0713:15clojer[cider/cider-nrepl ā0.15.0-SNAPSHOTā] matches the Spacemacs version#2017-04-0713:15eggsyntax@reefersleep I believe that's correct (re reflog). I think it persists files naively until/unless you delete them yourself, but I wouldn't swear to that.#2017-04-0713:16clojer2.3.0-SNAPSHOT seems to be the refactor-nrepl version so ārespectivelyā seems to be wrong?#2017-04-0713:17reefersleephm, I'd like some documentation on that, will have to dig it up or ask in the right places... Are your persistent save history files created in the same place as the original file, or in some designated (by your or some default settings) location? @eggsyntax#2017-04-0713:17eggsyntax@clojer I believe you no longer need to have them in your personal profiles.clj -- I don't, anyway, and the refactor stuff works fine for me.#2017-04-0713:19eggsyntax@reefersleep my .spacemacs contains the following -- I believe it was in there at install:
;; Location where to auto-save files. Possible values are `original' to
;; auto-save the file in-place, `cache' to auto-save the file to another
;; file stored in the cache directory and `nil' to disable auto-saving.
;; Default value is `cache'.
But unfortunately there's not an actual var there other than undo-tree-auto-save-history -- maybe that's it? I just have it set to t. I'm afraid I don't recall if/when I set that myself; too long ago...#2017-04-0713:20eggsyntaxBut I'd suggest checking for that in your .spacemacs.#2017-04-0713:20clojer@eggsyntax Just refactor-nrepl or cider-nrepl as well?#2017-04-0713:21eggsyntaxAh, ok, based on the template, it looks like it is undo-tree-auto-save-history.#2017-04-0713:21eggsyntax@clojer I have both commented out in my ~/.lein/profiles#2017-04-0713:21eggsyntax.clj#2017-04-0713:22reefersleepuhm... I do have dotspacemacs-auto-save-file-location 'cache#2017-04-0713:22reefersleepon my work pc, anyways#2017-04-0713:23reefersleepI guess I'll have it at home, too#2017-04-0713:23reefersleepBut do you mean that having dotspacemacs-auto-save-file-location 'cache is the same as having undo-tree-auto-save-history set?#2017-04-0713:23reefersleep@eggsyntax#2017-04-0713:24reefersleeplooks up documentation#2017-04-0713:24eggsyntax@clojer disclaimer: that's just based on what I happen to have, can't swear it's correct š
@reefersleep dunno, I'd have to go look at the docs also.#2017-04-0713:26clojer@eggsyntax Just commented-out as suggested but no change in the Spacemacs error.#2017-04-0713:27eggsyntax@reefersleep I've got both dotspacemacs-auto-save-file-location 'cache and undo-tree-auto-save-history t -- the former had just gotten misplaced to another part of my .spacemacs.#2017-04-0713:27eggsyntax@clojer you're on current version of spacemacs? & I assume you did a spacemacs restart?#2017-04-0713:27clojer@eggsyntax Yes to both#2017-04-0713:30eggsyntaxHmm. Dunno then. It's possible that cider-nrepl isn't actually active for me; I forget what functionality that gives you.#2017-04-0713:30eggsyntaxYou may want to see https://github.com/clojure-emacs/cider/issues/1140, although that could be outdated.#2017-04-0713:31eggsyntaxOh, yeah, refactor-nrepl docs say:
*With CIDER and clj-refactor*
If you're using CIDER and clj-refator you don't have to do anything except call cider-jack-in. The dependencies are injected automagically.
Be aware that this isn't the case if you connect to an already running REPL process. See the cider documentation for more details.
#2017-04-0713:33reefersleephmmmmm... My ~/emacs.d/.cache/auto-save/site/ dir contains a number of files beginning and ending with #. I assume these are files containing auto-save information. However, there are not nearly as many files as I have ever opened on this PC. Some of them, I haven't opened recently. And the ones I have opened right now are not there.#2017-04-0713:33clojerAnother cider/nrepl time-waster. Jeezus. I thought an effort was being made to make cider easier to use.#2017-04-0713:36reefersleepI'm not sure what to make of that dir. Guess I'll check it at home, see if there's any useful info. I would still like to know the definitive consequences of these settings, so that I can use them properly š#2017-04-0713:36reefersleep*hoping that some spacemacs authority pics up on this#2017-04-0713:36reefersleepAnyways, thanks a lot for your help, @eggsyntax , I'm much closer to the answers I'm seeking.#2017-04-0713:39clojer@eggsyntax cider-jack-in solved it but it takes about 40 seconds longer than cider-connect on my workstation#2017-04-0713:39eggsyntax@reefersleep yeah, NP, Iād be curious to hear what you end up finding out.#2017-04-0713:40eggsyntax@clojer ah, yeah, gotcha. I use jack-in, so itās a different story. If youāre connecting, I assume you need to have both libs in your personal profiles.#2017-04-0713:40reefersleepWill keep you posted š#2017-04-0713:41clojer@eggsyntax Doesnāt work with cider-connect either way. I had everything in my ~/.lein/profiles.clj when I posted the error.#2017-04-0713:42clojer@eggsyntax This is a fairly recent development as I didnāt have this error a few months back.#2017-04-0713:42eggsyntaxDamn. OK, outside my personal experience, then. Good luck!#2017-04-0713:48clojer@eggsyntax Correction cider-jack-in is taking 90 seconds with a fairly stock Luminus project without any cljs, swagger etc.#2017-04-0713:48clojer@eggsyntax That makes Spacemacs/Emacs/Cider an non-starter for me, Iām afraid#2017-04-0714:20shandoes it take that long on every cider-jack-in?#2017-04-0714:26clojer@shan Yes. Itās nothing to do with the project#2017-04-0714:28clojerThings have been generally a bit slower after the Sierra upgrade but not this bad.#2017-04-0714:29shaneven on a fresh new project? Iām on Sierra and just updated to the latest spacemacs + updated all my packages#2017-04-0714:34clojer@shan 60 seconds with a new project#2017-04-0714:36clojer@shan All I can say is cider ran a lot faster when I first tried it a year ago. Even on my 3-yr old Macbook Pro the project took 45 seconds with cider-jack-in#2017-04-0714:37clojer@shan The workstation is a 7-year-old 2.8Ghz quad core i7#2017-04-0714:41shanstrange. Is this with a fresh install of spacemacs and any cider references removed from ~/.lein/profiles.clj#2017-04-0714:41clojer@shan The Macbook Pro takes 25 seconds to boot a new project#2017-04-0714:42clojer@shan References restored so still present. Will try without.#2017-04-0714:46clojer@shan Removing ~/.lein entries for cider & refactor made no difference#2017-04-0714:47clojer@shan Spacemacs and packages all up to date#2017-04-0714:48eggsyntaxActually, might be worth trying with personal profiles removed entirely (or moved to backup file); I wonder if there could be another plugin/dep slowing things down.#2017-04-0714:48eggsyntaxAlso -- up-to-date version of lein?#2017-04-0714:49clojer@eggsyntax Good idea. Will try that. Yes, lein is up to date#2017-04-0714:49shanon a current work project cider-jack-in takes about 25-30s#2017-04-0714:49shantop specād 15" macbook pro mid 2015#2017-04-0714:49eggsyntaxI'd also be curious about startup time on lein new myproject rather than a new luminus project.#2017-04-0714:49eggsyntax(if you're still creating them as luminus projects)#2017-04-0714:49clojer@shan No, 45 seconds on the original project. 25 from a new basic project with no code.#2017-04-0714:50clojer@eggsyntax 25 seconds is for a new base Clojure project, not Luminus#2017-04-0714:51shan~15 seconds on a new project lein new app#2017-04-0714:51eggsyntaxGotcha.#2017-04-0714:53eggsyntaxSo it sounds like you & shan are at least in the same ballpark now (25 sec vs 15).#2017-04-0714:59clojer@shan Removed ~/.lein/profiles.clj entries but still 25 secods for a new blank Clojure app.#2017-04-0715:00shanwhat spec macbook pro are you using?#2017-04-0715:00clojer@shan ā¦. with cider-jack-in, that is#2017-04-0715:01clojer@shan Early 2013 2.4Ghz i7 with 8Gb RAM#2017-04-0715:01shanprobably about right then, itās just generally slow š#2017-04-0715:02shanconsidering Iām on a mid 2015 2.5 i& with 16 GB#2017-04-0715:02eggsyntaxFWIW, I'm on a project with > 60 sec startup. It's annoying, but def not a showstopper; I just use workflows that rarely require a full restart.#2017-04-0715:12clojer@eggsyntax Corrrect me if Iām wrong but if I add a new library to a file via :require a repl reboot is required, no? Even with mount or component.#2017-04-0715:13eggsyntaxYep. I think I've seen that there's a workaround to dynamically load it, but I've never used it.#2017-04-0715:14eggsyntax<shrug> I probably average 2-3 repl reboots a day; I can live with that.#2017-04-0715:14shanclojure-refactor in spacemac should autoload new dependancies#2017-04-0715:15eggsyntaxIt's my moment to go get more coffee š#2017-04-0715:15shanSPC-m-r-a-p#2017-04-0715:15eggsyntaxFor me personally, I get enough productivity gain from spacemacs to make it worth while.#2017-04-0715:15eggsyntax@shan ooooh, killer, didn't realize that! Sweeeeeet š#2017-04-0715:16shanitās pretty nice, allowing you to select specific versions#2017-04-0715:16shanauto loads and adds to your project.clj file#2017-04-0715:26clojer@eggsyntax I donāt see an M-x clojure-refactor option in Spacemacs#2017-04-0715:28clojer@eggsyntax Sorry that should have been for @shan#2017-04-0715:29eggsyntaxLook for clj-refactor-mode.#2017-04-0715:29eggsyntaxAnd then the various refactorings are in your menu under SPC m r.#2017-04-0715:43clojer@eggsyntax As far as I can make out SPC m r a p loads a lib but after I :require it doesnāt appear to be loaded#2017-04-0715:44eggsyntaxWell, I haven't used that one, that was @shan#2017-04-0715:44clojerāaddsā not āloadsā#2017-04-0715:44clojer@eggsyntax Damn. Did it again.#2017-04-0715:45eggsyntaxLOL NP#2017-04-0715:45clojer@shan SPC m r a p seems to add a lib to the projects.clj file but when I :require it nothing is added to the current fileās namespace.#2017-04-0715:46shandid you evaluate the file?#2017-04-0715:47clojer@shan I addeed [selmer.parser] but after a Ctrl c l to load it into the repl the render symbol was not resolved#2017-04-0715:47shanor try and load it in the repl? (require '[cheshire.core :as json])#2017-04-0716:10beppu@clojer It's possible to load new dependencies into a running repl with SPC m r h d.#2017-04-0716:11beppuI could have sworn SPC m r a p also loaded new libraries into the repl in addition to adding it to project.clj.#2017-04-0716:11eggsyntaxāhotload-dependencyā, that makes more sense.#2017-04-0716:14beppu@clojer After you do SPC m r a p, you probably have to say (require '[your.lib :as y]) in the repl.#2017-04-0716:20clojer@beppu For some reason I tried hotloading selmer into a new Clojure project and received what appear to be unrelated errors beginning with:#2017-04-0716:20clojerWARN: org.clojure/clojure version 1.7.0 requested, but 1.9.0-alpha15 already on classpath.
Loaded dependencies:
[[args4j ā2.0.16ā]
[cheshire ā5.6.3"]#2017-04-0716:20clojer⦠hiccup ⦠joda-time ⦠guava ā¦.#2017-04-0716:21beppuIf it's just a warning, I think you can ignore it.#2017-04-0716:22beppu(maybe)#2017-04-0716:22clojer@beppu Maybe but why is the process referencing a ton of what appear to be unrelated libs?#2017-04-0716:22beppuWhat did you try to load?#2017-04-0716:23clojer⦠protobuf-java ā¦. rhino ā¦.. ?#2017-04-0716:23clojer@beppu selmer.parser#2017-04-0716:26beppuSome of those show up here: https://crossclj.info/ns/selmer/1.10.6/project.clj.html#2017-04-0716:47clojer@beppu I add a function to the file and try to reload with C-c C-l and now receive the error: āSearch failed. This means there is unmatched expression somewher or we are at the beginning/end of file.ā#2017-04-0716:47clojer@beppu Not at the beginning or end of the file.#2017-04-0716:49clojer@beppu Sorry, that was a parent error.#2017-04-0717:07beppu@clojer After I add a function to a file, I usually reload the whole buffer with SPC m s b or , s b (same thing).#2017-04-0717:07beppuI find , s b easier to type.#2017-04-0720:59agdoes anyone know how to make cider-find-var , g g g d less stupid? Why the hell it would prompt for the symbol when the cursor is at the symbol?#2017-04-0721:02agI thought maybe I could use dumb-jump instead, but I could find a good way of setting spacemacs-jump-handlers-clojure-mode after itās set in clojure layer. Besides sometimes dumb-jump is just that - too damn ādumbā. But cider-find-var doesnāt seem to be smarter either#2017-04-0721:02aghas anyone solved jump-to-definition in clojure/clojurescript projects?#2017-04-0721:12agAnother problem is that cider-find-var miserably fail if thereās no connected repl. Ideally what should happen I think is:
1) if repl is connected - apply cider-find-var to the current symbol
2) if no connected repl - use dumb-jump#2017-04-0721:14agI am to be honest utterly surprised that we havenāt solved this simple problem. Feels really bad of not having something basic like this and let Cursive users to gloat about that#2017-04-0721:15eggsyntaxWhile I agree that that's kinda weak, and your proposed behavior seems like a good fix, I'm just happy to know that dumb-jump exists; I hadn't run across it.#2017-04-0721:16eggsyntaxI'd suggest opening a spacemacs ticket pointing out that cider-find-var fails without a repl & proposing the fallback behavior that you described.#2017-04-0721:38aghttps://github.com/syl20bnr/spacemacs/issues/8663#2017-04-0722:29eggsyntaxI'll go vote for that š#2017-04-0722:30eggsyntaxJust noticed a minor annoyance, that dumb-jump forces a file save before use...#2017-04-0722:31eggsyntaxAh. @ag FYI, cider-find-var does not normally ask me for a symbol, unless the repl isn't running.#2017-04-0722:34agyeah, I canāt figure out why it keeps prompting for a symbol#2017-04-0806:03jumartry to eval buffer, before cider-find-var#2017-04-0811:34reefersleep@eggsyntax : if you want to revisit undo-tree history, do you first do undo-tree-load-history? Just trying to figure out if I'm doing things right here.#2017-04-0811:40reefersleepAfter having added (setq undo-tree-auto-save-history t) to the (defun dotspacemacs/user-config () part of my .spacemacs, I seem to have gained some kind of persisted undos that can be revisited with undo-tree-load-history. However, if I edit a file, save and close emacs, then reopen the file, edit a bit more and try to do undo-tree-load-history, emacs says it can't because I have edited the file, so this is not quite equivalent to what I've experienced before with vim.#2017-04-0811:40reefersleep(And still desire)#2017-04-0811:42reefersleepWhat I would really like is a potentially endless, undoable history of the edits that I have performed on all of the files I have opened in emacs, possibly stored in some place of my choosing, and possibly with some kind of cap of my choosing. I'm not sure that this is readily available in Spacemacs or Emacs, but if anyone knows about it, I'd love a pointer!#2017-04-0813:33eggsyntax@reefersleep interesting. I never explicitly load the undo tree; I just do undo-tree-visualize & itās there, and persists after quitting & restarting emacs. Donāt know why the difference. Iāll attach my .spacemacs in case youād like to pick through it, see if you can isolate the difference (pardon the mess š ).#2017-04-0819:51reefersleep@eggsyntax that is a bit weird. Thanks for the upload, I'll have a look at it š#2017-04-0820:08reefersleep@eggsyntax Didn't spot anything particular about your .spacemacs. However, I figured something out about the behavior of undo-tree on my computer; if I emacs file, undo-tree information persisted from earlier sessions is not loaded. Once I have started emacs, any file I open from inside emacs will open with undo-tree information loaded.#2017-04-0820:09reefersleepKind of annoying, since it means that at any time, I risk overwriting the previously recorded undo-tree history by opening a file from the terminal and editing it.#2017-04-0820:27eggsyntaxOh, that's annoying š#2017-04-0820:35reefersleephttps://stackoverflow.com/questions/38428941/undo-tree-doesnt-auto-load-history apparently someone else has experienced this, too. Seems to me to be a legit bug that just hasn't been fixed yet.#2017-04-0820:40eggsyntaxOddly, I don't get that behavior. FWIW I'm running emacs-plus on a Yosemite mac.#2017-04-0820:52reefersleephmmmmm#2017-04-0821:26reefersleepI'm using spacemacs 0.105.19, with emacs-24.5.1, on Ubuntu.#2017-04-0821:27reefersleepI've sent the creator of Undo Tree, Toby Cubitt, a mail regarding the issue.#2017-04-0821:27reefersleepWill have to see what he says š#2017-04-1022:50eggsyntaxAnyone know a way to show what a key sequence would do if you were in holy mode? Alternately, can any holy-mode users tell me what C-u C-c M-j is bound to by default? It's recommended by bbatsov at https://github.com/clojure-emacs/cider/issues/835, and I'm just trying to figure out what actual command he means.#2017-04-1023:19jstewC-c M-j is cider-jack-in if I recall correctly. I'm not sure that the prefix argument before that does.#2017-04-1101:25eggsyntax@jstew thanks. I commented on that ticket, and it looks like it's cider-load-buffer-and-switch-to-repl-buffer, although it's not at all clear to me how you could use that to trampoline the cider repl, which was my original aim.#2017-04-1101:28clojerMy Spacemacs (Sierra) repl seems to hang when 100 rows are returned from a HugSQL query. Anyone noticed anything similar?#2017-04-1716:56bjaThe following happens to me at least twice a week:
*finds a new feature in emacs/spacemacs/cider/clj-refactor*
"This is awesome! I'm going to use this."
.... time spent using it ....
"This aspect is something I dislike."
.... reads docs ....
"Oh, there's a variable to do what I'd prefer."
#2017-04-2004:09romainSpeaking about clj-refactor, in a .cljs file, I cannot extract a function, I got cljr--maybe-rethrow-error: Only .clj files are supported! any idea ?#2017-04-2007:28jumarAs error message says, only clojure files are supported. I think (hope) it's a work in progress to implement support for ClojureScript#2017-04-2011:52romainAFAIK it supports cljs and cljc and I saw it working in a lambdaisland video #2017-04-2014:25jumar@romain Yeah, I saw it too, but it didn't work for me. I talked to plexus about this and he responded with following:
> I think it might have worked with an older version of clj-refactor. I met up with one of the maintainers recently and he mentioned they used to have an analyzer for cljs, but it's not maintained and so they had to drop it, which means certain operations can't be supported#2017-04-2014:26romain@jumar did it too lol š. You can check this https://github.com/clojure-emacs/refactor-nrepl/issues/195#2017-04-2014:29jumarsubscribed - thank you š#2017-04-2508:19rustam.gilaztdinovHi, guys! Can someone help me with key bindings? I want to rebind 'cider-eval-defun-at-point from SPC m e f to SPC SPC
I guess all magic happening in ~/.emacs.d/layers/+lang/clojure/packages.el?#2017-04-2508:52rustam.gilaztdinovIf anyone interested ā just add in https://github.com/syl20bnr/spacemacs/blob/master/layers/+lang/clojure/packages.el#L98
(dolist (m '(clojure-mode
clojurec-mode
clojurescript-mode
clojurex-mode
cider-repl-mode
cider-clojure-interaction-mode))
(spacemacs/set-leader-keys-for-major-mode m
"," 'cider-eval-defun-at-point)
(mapc (lambda (x) (spacemacs/declare-prefix-for-mode
m (car x) (cdr x)))
cider--key-binding-prefixes)
Now on s-exp simply type , , and it will be evaluated#2017-04-2508:54rustam.gilaztdinovIf add
(spacemacs/set-leader-keys-for-major-mode m
"SPC" 'cider-eval-defun-at-point)
s-exp will work on SPC m SPC or , SPC
I think , , ā faster š#2017-04-2510:31practicalli-johnny@rustam.gilaztdinov yes, I use a similar binding to show a commented result on evaluation "e;" 'cider-eval-defun-to-comment#2017-04-2510:34practicalli-johnny@rustam.gilaztdinov you propose a nice binding with , ,, are you going to create a pull request to have it as part of the clojure layer? I am going to create a pull request for mine, but not until the weekend.#2017-04-2511:06practicalli-johnnyI would like to have a binding that inserts a #_ at the start of an expression, to comment out that expression. Is there such a function already?#2017-04-2514:38bjaI usually rebind C-c C-c to eval the current 'graph under point in whatever language I'm in#2017-04-2514:43bjatypically using emidln//generic-eval-operator and emidln//generic-send-operator, which is a function that sets up eval-sexp-fu overlays for each language. Then I rebind all of the eval/send functions in terms of the the generic operators. Makes it easy so I can just define an alist with mode and a function to take a region and eval/send it with all the plumbing taken care of.#2017-04-2514:44bjabut it's also nice to just have an operator in evil that I can compose up a custom selection and eval it#2017-04-2518:51romainI have stable emacs-mac installed with brew. Do I need to reinstall it if I want to switch to HEAD ?#2017-04-2520:11ag@romain use emacs-plus formula - especially if youāre using magit#2017-04-2520:17ag@jr0cket whatās your opinion on https://github.com/syl20bnr/spacemacs/issues/8663#2017-04-2614:28practicalli-johnnyI've seen quite a few people mention this issue. I don't use jump (although I should learn too). I'll take a look at the issue at the weekend (need to finish a presentation for a conference on Friday). Thanks#2017-04-2621:26agThanks John, I thought I could work a workaround, turned out to be not so simple as it sounds - the way how Spacemacs handles ājumpersā is a bit tricky#2017-05-0119:26practicalli-johnnyhmm, you can use the function in cider to see if there is a current repl running: cider-connected-p but it seems you still need to check if the definitions are in the namespace if you want spacemacs/jump-to-definition to work#2017-05-0120:17practicalli-johnnyOn the github issue I've added an example of a keybinding for the clojure layer that could detect the repl is running and use jump-to-definition if it is and fall back on dumb-jump-go if it is not#2017-04-2520:18romain@ag I used emacs-plus, first I liked it seems heavier and less stable#2017-04-2520:19romainI'm on a Macbook 15" mid 2012 with macos sierra#2017-04-2520:19romainI went back on emacs-mac and it feels better#2017-04-2520:19agdo you have osx layer added?#2017-04-2520:20romainnop, last time I checked I didn't see something interesting#2017-04-2520:20romainfor m#2017-04-2520:20romainme*#2017-04-2520:22agI had numerous problems with non-GNU versions, every time I try thereās something different. gnu cocoa version works fine for me. Although when installed on linux it feels way more smoother#2017-04-2520:23romainI use only mac āŗļø#2017-04-2520:24agdo you use magit?#2017-04-2520:24aghave you seen this post https://magit.vc/manual/magit/MacOS-Performance.html#2017-04-2520:25romainYes#2017-04-2520:28romain@ag https://www.reddit.com/r/emacs/comments/66o45w/patch_emacs_to_speedup_magit_on_macos/dgk5kjg/?utm_content=permalink&utm_medium=front&utm_source=reddit&utm_name=emacs#2017-04-2520:29romainThat's why I wanted to switch to HEAD š#2017-04-2520:30agthen you can just brew reinstall emacs-mac --HEAD#2017-04-2823:48asragabSo, this is a long-shot but I figured I would ask here.
A week or so ago, was knee deep in some Clojure with CIDER jacked in and I hit some set of key combinations and managed to enable some kind of tooltip (i.e. a popup that appeared below the cursor) that had usages of the symbol at that point.
Moreover I was able to scroll and navigate to that usage in a different file. I donāt think I was hallucinating, but since then I havenāt been able to find that key-combination, and I didnāt think to look it up in describe-key. Has anyone experienced such a miracle?
On a side note Iād like to start a Craiglist āMissed Connectionsā but instead of being for random hookups, missed emacs actions.#2017-04-2900:28agasragab: https://twitter.com/iLemming/status/854707245656887296#2017-04-2900:31asragabThank you, I will definitely keep that around the next time I do something like that!#2017-05-0711:33reefersleep@asragab I just want to say that I found find your experience very intriguing, and have been searching for it by googling and trawling through function names with M-x. Like you and @eggsyntax found, it seems like cljr-find-usages has the content of the popup you saw, but the popup - a small overlay at the cursor position, when pointing to a var - eludes me. It seems like popup.el can maybe provide some of the functionality you are talking about, but it does not seem to be available in my pretty vanilla spacemacs configuration.#2017-04-2900:28agasragab: https://twitter.com/iLemming/status/854707245656887296#2017-05-0711:33reefersleep@asragab I just want to say that I found find your experience very intriguing, and have been searching for it by googling and trawling through function names with M-x. Like you and @eggsyntax found, it seems like cljr-find-usages has the content of the popup you saw, but the popup - a small overlay at the cursor position, when pointing to a var - eludes me. It seems like popup.el can maybe provide some of the functionality you are talking about, but it does not seem to be available in my pretty vanilla spacemacs configuration.#2017-04-2900:09eggsyntaxHa! K pulls up documentation at the bottom, youāre probably aware of that one. For me, if I move the cursor away from a function-name symbol & back I get a little message at the bottom showing what args it takes. Are you thinking of either of those?#2017-04-2900:15eggsyntax(you probably need the ns loaded in the repl for those to work)#2017-04-2900:16eggsyntax^ @asragab#2017-04-2900:18eggsyntaxYou're probably well aware of those, but figured I'd rule them out 1st. I'm def curious about what you found, it sounds excellent š#2017-04-2900:19asragabit really does, like I almost do believe I was hallucinating#2017-04-2900:19asragabbut I didnāt know about K#2017-04-2901:01eggsyntaxasragab: so does K do the thing youāre talking about? Or was it something different?#2017-04-2901:07asragabIt was something different...it actually appeared in the active buffer like an ide tooltip#2017-04-2900:20asragabthank you#2017-04-2901:04eggsyntaxOh, wait, I was slightly misreading your original post. Are you talking about cljr-find-usages?#2017-04-2901:05eggsyntax, r f u#2017-04-2901:08asragabSort of but in a popup directly below the cursor #2017-04-2901:08eggsyntaxGotcha.#2017-04-2901:37jeff.terrellMaybe it was a vision, intended to inspire you to create this functionality. :-)#2017-04-2920:53lvhI recently upgraded spacemacs and itās confusing the heck out of me. I get a big message with the new changelog that wonāt go away. The bottom of the message suggests I should upgrade packages (done) and edit my dotfile. <SPC> f e D sends me to an ediff sessnion. I went through the diff; Iām happy with my dotfile as-is. What do I do to get rid of this splash screen?#2017-04-2920:56lvhI understand that feD is supposed to give me a diff; but it really seems like spacemacs wants me to do something to complete the upgrade and I have no idea what#2017-04-2923:52eggsyntaxre: @asragab 's mystery function -- here's something kinda cool I found while poking around for it out of curiosity:
cider-eval-defun-to-comment is an interactive compiled Lisp function in `cider-interaction.el'...Evaluate the "top-level" form and insert result as comment at LOC.
@lvh no idea -- what version did you upgrade to?#2017-04-2923:53lvhlatest == /cdn-cgi/l/email-protection (spacemacs)#2017-04-2923:53eggsyntaxWorst case you could probably delete ~/.emacs.d & reinstall, preserving your .spacemacs#2017-04-2923:54asragabhehā¦#2017-04-2923:54eggsyntax(or maybe deleting all the automatically-added bits at the end of SM)#2017-04-2923:54asragabI like that#2017-04-2923:54eggsyntaxYeah, handy for wanting to provide an example use in about a second š#2017-05-0116:11practicalli-johnny@eggsyntax I am going to suggest e ; as a keybinding for cider-eval-defun-to-comment in a pull request, as I use that a lot. The keybinding from CIDER is C-c M-; so it seems a reasonable Spacemacs keybinding#2017-05-0116:13eggsyntax@jr0cket cool. So what do you typically use it for? So far I've been finding it a bit less handy than I initially thought.#2017-05-0116:15practicalli-johnnylive coding demos, coding dojos and pair programming - and just so I dont need to remember what other parts of the code should do š#2017-05-0116:15practicalli-johnnyI tend to create a lot of REPL driven development code in the namespace, to explore what things do...#2017-05-0116:16practicalli-johnnyor if I am trying to figure out some code#2017-05-0116:17eggsyntaxThe former three make tons of sense, hadn't considered contexts where you want to demo something to someone who's watching. The latter hasn't been so much, for me -- seems like the comment is mostly only useful if it's a pretty static bit of code. & in the REPL I tend to just eval & let the result print.#2017-05-0116:17practicalli-johnnyI tend to use it less when I know whats going on š#2017-05-0117:32practicalli-johnnyI've created a pull request to add the keybinding for cider-eval-defun-to-comment here: https://github.com/syl20bnr/spacemacs/pull/8838#2017-05-0320:07naomarikjust found out about , f l to align forms/maps automatically⦠i had assumed people were doing this manually#2017-05-0410:13shannaomarik: Ctrl-C Spc also points to the same function š#2017-05-0403:02jstokesanyone successfully overridden the cider-pprint-fn to puget/fipp?#2017-05-0414:21jstokeswell I donāt know what I did differently, but this morning it seems to be working š#2017-05-0418:49eggsyntaxI would swear there was a way to toggle SM between two different structural editing modes, but damned if I can find it. Anyone?#2017-05-0418:50griersonNewbie question - I keep getting this error. āSymbols value as variable is void company-frontendsā. Iāl finish an expression then press enter to start a new line but I think Spacemacs is reading it as trying to autocomplete but there is nothing to complete.#2017-05-0418:51eggsyntaxSounds like maybe company, or company-frontends, isn't installed? IIRC company has to be installed on your system to use it for autocompletion. Have you changed any settings related to autocompletion?#2017-05-0418:52griersonnope, using the default .spacemacs config#2017-05-0418:53eggsyntaxWeird. No clue, then. Do you have some customization in the ~/.emacs.d directory left over from customizing a previous emacs distribution?#2017-05-0418:54griersonNope, I hit enter for all the default options when I first installed.#2017-05-0418:55eggsyntaxNo idea, then, I'm afraid, other than to google the error, which I'm sure you've done. Good luck!#2017-05-0418:55griersonYep š Thanks#2017-05-0420:32jstokesand just like that cider-pprint-fn goes back to clojure pprint. (after spacemacs restart)#2017-05-0420:34jstokeseven in customize-group itās set to puget, thoroughly confused#2017-05-0420:34eggsyntax@jstokes I'd expect you could add (setq cider-pprint-fn fn-you-want) to your .spacemacs. Or setq-default.#2017-05-0420:34jstokesyeah i have this in my user-config#2017-05-0420:34jstokesand looking at customize-group it is applied#2017-05-0420:36jstokesthis is when calling C-c C-p cider-pprint-eval-last-sexp fwiw#2017-05-0420:37eggsyntaxGotcha. That's annoying. Maybe you have to setq it (with-eval-after-load 'clojure-mode ... )?#2017-05-0420:37jstokesiāll give that a shot when i donāt have repls running that i dont want to abandon#2017-05-0420:37eggsyntaxI know that feeling#2017-05-0420:38jstokesi need a meta-repl where i can (flush-state-to-disk!) š#2017-05-0420:41jstokesthis may have worked for a while earlier since i was hacking around with the cider elisp. in some places it looks like we can pass in a pretty-printer, and i just nuked those#2017-05-0420:41jstokesthe extent of my elisp knowledge is balancing parens though#2017-05-0517:00rquisenbHey guys in eed some help. I booted spacemacs today, and the window is MAD small. like 2x2, text is prolly 4px big#2017-05-0517:00rquisenbC-x and C-0 do nothing#2017-05-0517:01rquisenbive deleted .emacs.d#2017-05-0517:01rquisenbdeleted spacemacs#2017-05-0517:01rquisenbetc.#2017-05-0517:15beppuSPC SPC toggle-frame-maximized#2017-05-0517:17rquisenbi cant even see the textr#2017-05-0517:18rquisenbto do that#2017-05-0517:18rquisenbits that small#2017-05-0710:07practicalli-johnny@rquisenb To maximise the frame use SPC T M or M-m T M if you are in Emacs mode. If font is still too small, then reset the size with SPC z x 0 or M-m z x 0. If none of that works (and those are Spacemacs specific commands), then I suggest something is set in your home directory to make the Emacs window very small (I have no idea what that could be)#2017-05-0711:54reefersleepI ran some sort of test report in a file, and now that file is read-only and has no syntax highlighting (all the text is white), even though the file looks completely normal and I cannot find any special dotfiles in the same dir (such as for example a .file.cljs.~undo-tree~) to indicate that the file is in a particular state. halp!#2017-05-0711:54reefersleep(I restarted Emacs, too)#2017-05-0711:55reefersleepAccording to the info line, the file is a Test Report and not a Clojurescript file.#2017-05-0714:18eggsyntax@reefersleep Weeeird. Maybe just copy the contents of the file in another editor into a different file and delete the original? Definitely nothing Iāve ever encountered. Itād be interesting to know what major mode & minor modes are active when youāre in that file.#2017-05-0718:53reefersleep@eggsyntax: I tried mv'ing the file to something else, and then it worked like it normally would, with syntax highlighting and Emacs perceiving it as a Clojurescript file and everything. I then mv'ed it back to the previous name and the "testful" state returned, so it's definitely bound to the file name somehow.#2017-05-0718:54reefersleepI had wanted to rename the file and ns anyway, so I went ahead and did that and ignored the problem with the previous file name, but I can pull it back up and have a look at major and minor modes. What is the easiest way to list these?#2017-05-0721:58eggsyntax@reefersleep Major mode should be shown on the modeline ā Iād expect it to say Clojure. describe-mode (`SPC h d m`) will show all active modes, both minor and major.#2017-05-0811:47naomarikanyone know how to use a specific/older version of a package? iām trying to revert CIDER back to 14 from 15-snapshot and canāt seem to do it or find any info on this#2017-05-0820:05jstokesyeah @naomarik, you can do this by adding these lines to your ~/.spacemacs in dotspacemacs/init
(push '("melpa-stable" . "") configuration-layer--elpa-archives)
(push '(cider . "melpa-stable") package-pinned-packages)
#2017-05-0820:06jstokesdelete the cider folder in ~/.emacs.d/elpa/#2017-05-0820:06jstokesrestart, and it will download 0.14.0 instead#2017-05-1121:51bfayIs there a way to bind a key to a function, but only for a specific mode? I know you can do this for shortcuts using leader keys; I used this to set my cider eval shortcut to , ,
(spacemacs/set-leader-keys-for-major-mode m
"," 'cider-eval-sexp-at-point)
But now Iām thinking, āhey, I never use semicolon for anything, might as well eval with that.ā
I can globally define the key like this:
(define-key evil-normal-state-map (kbd ";") 'cider-eval-sexp-at-point)
And that totally works for me, but I was wondering if thereās a way to restrict it by mode.#2017-05-1121:53bfay(PS: something evalāing clojure with ; feels really good, trust me!)#2017-05-1122:58ag@bfay (evil-define-key 'normal clojurescript-mode-map ";" 'launch-nukes)#2017-05-1213:11bfayag: Thank you!!!!#2017-05-1209:38claudiuHi. Totally new to spacemas. Seems really nice, but canāt seem to find a way to install Parinfer. Can anyone help me out with this ?#2017-05-1214:51akivaAs far as I know, thereās not yet a Parinfer layer so youāll have to bolt it on manually. I donāt use it myself but I think it relies on JavaScript or some other external language to do its magic.#2017-05-1215:01jumarHi, I've just finished the video about Clojure development with spacemacs: https://www.youtube.com/watch?v=4ecC3jqHooc
There's also a companion blog post with short summary: https://curiousprogrammer.net/2017/05/12/clojure-development-workflow-with-spacemacs-and-cider/
You can check them out if you think they will be useful for you (especially the beginners)#2017-05-1215:11jumarI'd appreciate if you leave some comments, since this is my first video. So far, I'd be more happy if I'd used larger font and doing it a bit shorter.#2017-05-1215:17jstokes@claudiu might want to look at https://github.com/syl20bnr/spacemacs/pull/7339 if you havenāt already#2017-05-1216:04jstokesif you canāt wait for that to be merged (it has been open a while) these steps seemed to work for me:
- $ cd ~/.emacs.d
- $ git remote add doglooksgood
#2017-05-1218:04claudiuthank you š works now.#2017-05-1219:34claudiuanyone know if thereās a simple way to have ācider-grimoireā formatted nicely with colours ?#2017-05-1220:44jeff.terrell@jumar - I haven't watched it yet, but I'd think that's appropriate for #announcements to get a wider audience. :-) Ask in #slack-help (or maybe ask @seancorfield directly) if you're not sure.#2017-05-1220:52jumar@jeff.terrell thanks, but I don't want to disturb too many people š. I think that this channel is just the right granularity.#2017-05-1419:03fatihict@claudiu The lisp mode is also worth looking into š. Since I've discovered it, my life is much better š https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#lisp-key-bindings.#2017-05-1506:20claudiu@fatihict thank you. Will take a look#2017-05-1515:44eggsyntaxI did some profiling & discovered that aggressive-indent-mode is causing considerable slowdown for me. The trouble is that I can't seem to turn the damn thing off š
Have tried all of the following in my .spacemacs, but none of them work (ie help-describe-variable aggressive-indent-mode still shows as t in my buffers. It notes in describe-variable that "Automatically becomes buffer-local when set;" I'm guessing that that's what causes the difficulty, but I don't know how I can work around it.
(setq global-aggressive-indent-mode nil)
(setq aggressive-indent-mode nil)
(global-aggressive-indent-mode nil)
(aggressive-indent-mode nil)
(spacemacs/toggle-aggressive-indent-globally-off)
Anyone have a suggestion?#2017-05-1607:26kurt-o-sysHey all, is there a way to start re-natal/cljs lein figwheel android as a spacemacs repl (if that question makes any sense)?
What I mean is: now, I start a shell in emacs and run lein figwheel android to start the cljs repl (figwheel). However, that does mean it does not support the usual repl support spacemacs has for clj/cljs, like shortkeys to copy code to the repl etc. So, I'd like to be able to start the 'fighweel android repl' as a normal repl SPC m s i or SPC m s c.#2017-05-1611:05practicalli-johnny@claudiu assuming parinfer is an emacs package you could try adding it to dotspacemacs-additional-packages '(parinfer) in your .spacemacs file. I have not tried parinfer myself in this way and you may need to add some keybindings in dotspacemacs/user-config#2017-05-1611:32claudiu@jr0cket worked nicely just by adding the files from the pull request#2017-05-2008:29kurt-o-sysIn spacemacs, I'm using eshell as shell. However:
$ TEST="$(cat my-file)" <command>
Symbol's value as variable is void: eshell-temp
When running cat my-file, I do get the contents of the file. What I want to achieve is to run a command with a given environment variable (`TEST` in this case) with the value of that variable read from a file.#2017-05-2008:30kurt-o-sysHow can I make that work in eshell/spacemacs?#2017-05-2010:20practicalli-johnny@kurt-o-sys sorry, I don't know much about shell, but you could configure Spacemacs to use your command line shell, e.g. bash, zsh - https://practicalli.github.io/spacemacs/create-a-project/using-emacs-eshell.html#2017-05-2010:49kurt-o-sys@jr0cket right, thx... Maybe it makes sense to not use eshell. It seems to have some other flaws, so yeah, I may dive into zsh and see how that works out.#2017-05-2321:07kurt-o-sysWorking with the clojure-layer of spacemacs: there are key bindings for reformatting:
SPC m f l - realign current form
SPC m f b - reformat current buffer
The first one is realigning, the latter reformatting. It's a different thing, clearly.
However, is there a way to realign and reformat the buffer automatically? If I reformat the buffer, not everything is 'realigned'...#2017-05-2409:24shanThereās also C-c SPC - clojure-align
C-c SPC runs the command clojure-align (found in clojure-mode-map), which is an
interactive compiled Lisp function in 'clojure-mode.el'.
It is bound to M-RET f l, M-m m f l, C-c SPC, and many ordinary text characters.
(clojure-align BEG END)
Vertically align the contents of the sexp around point.
If region is active, align it. Otherwise, align everything in the
current "top-level" sexp.
When called from lisp code align everything between BEG and END.
#2017-05-2409:55kurt-o-sysThx!#2017-05-2410:34practicalli-johnny@kurt-o-sys don't forget you can also use the TAB key to align the current line#2017-05-2413:15claudiuAnyone know how I can evaluate to browser from cljc files ? seems to go by default to the clojure repl#2017-05-2416:04ag@claudiu do you have clojurescript repl running? If you do, then you have to switch major-mode to clojurescript and then it will evaluate in cljs repl#2017-05-2418:37claudiu@ag that did the trick. Just switched from vim. thank you#2017-05-2418:39agbonus: you can see CLJ parts greyed out, and vice versa š#2017-05-2418:40ag@claudiu itās gonna be a bumpy road, but trust me - itās absolutely worth it. Diehard Vimmer here. One day I woke up knowing that Emacs is better Vim than Vim#2017-05-2419:07claudiu:)) so far so good, with evil mode I have 90% of the workflow I had in vim. For clojure develoment it seems on a totally different level š#2017-05-2501:45donyormBTW, sayid is now in clojure mode (at least on the develop branch) https://github.com/syl20bnr/spacemacs/pull/8536#2017-05-2506:25jkrmrIf anyone's got some time to play with a plugin , I'd love some thoughts on this small package I extracted from my dotfiles. It's a set of functions for yanking code as a formatted code listing with informative annotations like a commit ref, selected line number, file path, etc: https://github.com/jkrmr/yankee.el Thanks! š#2017-05-2511:09bpiel@donyorm thanks!#2017-05-2514:23eggsyntaxRecently updated SM & plugins, and there's been a behavior change that's driving me crazy. Previously, cmd 3 (or cmd-n for n in 0..9) or spc 3 would take me to the third window in the current frame (ie the third pane in the current window if you're using non-*macs terminology). Now it takes me to the third window with respect to all frames.
Anyone aware of a good way to flip that behavior back? I often have several frames open, and I don't want to have to maintain a total mental ordering of all windows across all frames.#2017-05-2620:46eggsyntaxIf anyone else gets annoyed with the issue I mentioned above re: frame switching, (setq-default winum-scope 'frame-local) will fix it back to the way it was.#2017-05-2623:59Drew VerleeHow do you pull down develop mode of spacemacs/is that a good idea?#2017-05-2701:03jstokesyou can checkout the develop branch in your ~/.emacs.d#2017-05-2715:04pcchrishow can I jump to the definition of a function in clojure.core?#2017-05-2715:48nikki;gg#2017-05-2715:48nikkior ,gg#2017-05-2715:49nikkidepends on ur layer prefix#2017-05-2716:14pcchrisDoesn't seem to work for jumping into the clojure jar#2017-05-2716:25eggsyntaxgd for me.#2017-05-2716:26eggsyntaxDoes go into jars IIRC.#2017-05-2718:06pcchrisit seems that cider-find-file is not working correctly#2017-05-2719:27eggsyntax@pcchris try spacemacs/jump-to-definition.
You can also fall back on dumb-jump-go if nothing else works for you.#2017-05-3020:30achikinAnd how to go back?#2017-05-3020:31jeff.terrellDoes C-o work?#2017-05-3020:31jeff.terrellThat's what I'd expect, from vim land.#2017-05-3020:45achikinYes, it works, thank you!#2017-05-3020:46jeff.terrellš I've been quite impressed with how faithful evil-mode is to vim.#2017-05-3020:47eggsyntaxEven has stuff like :g/foo/d, which it didn't have until fairly recently.#2017-05-3109:12shan@achikin SPC tab is nice for alternating between previous buffers#2017-05-3109:24achikin@shan, thatās great, thank you!#2017-05-3112:06reefersleep@achikin and if you get lost in your buffers and just want to return to a previous buffer window state, try winner-undo SPC w u (and winner-redo, SPC U, if you want to go the other direction)#2017-05-3112:06reefersleepI use it way more than I should#2017-05-3112:07reefersleepBut then, weird stuff happens when using certain layers/plugins, like opening and closing magit. Buffers are hidden and rearranged beyond my will. In those cases, winnder-undo is a good way go regain your bearings š#2017-05-3112:09achikin@reefersleep thank you, thatās super helpful, sometimes I press ESC ESC ESC and it closes all my windows except for that I was trying to close š#2017-05-3112:11reefersleephahaha š np#2017-05-3112:42reefersleepHow do you use negative lookbehind in an evil mode regex search, such as described here? https://ssiaf.blogspot.dk/2009/07/negative-lookbehind-in-vim.html#2017-05-3112:43reefersleepDoesn't work for me. Is it something to do with \ having differing meanings in emacs and vim?#2017-06-0300:25Drew Verleeiām trying to get parinfer perminally installed, i assume i can just add it as a layer āparinferā, but when i do that, nothing seems to happen (the options dont appear in my helm menu).#2017-06-0300:26Drew Verleeits not clear to be where i got to search for layers that i can install either.#2017-06-0300:30Drew Verleehmm i guess its not an offical layer yet#2017-06-0301:23romainDid you try to add it as an additional package in your .spacemacs? #2017-06-0314:33jstokesdrewverlee: you might have to switch to develop branch of spacemacs#2017-06-0323:43Drew Verlee@jstokes ill take a look thanks!
@romain no i tried to add it as a layer, iām confused as to whats considered a layer vs additional package sometimes. Thats why i was asking about where one could look at offical layers for SE.#2017-06-0607:26novelI think for layers only in available in devel the situation is sometimes confusing. For me somehow itās easier to look at the commit logs:
https://github.com/syl20bnr/spacemacs/commit/fab3b2a4e4cddb0cd76ea2be6beb21daf9451c09#2017-06-0712:11practicalli-johnny@drewverlee not sure if you worked out package vs layer. I think of it as Spacemacs having specific layers that are made up of one or more Emacs packages. If a package is not in a Spacemacs layer, then you can include the package via dotspacemacs-additional-packages section of .spacemacs.
Parinfer is not part of the Clojure layer. The package.el file of the layer shows you which packages are included.
Using parinfer may cause conflicts with smartparens. A package can be disabled globally in the dotspacemacs-exclude-packages section of .spacemacs. Or create a variable called clojure-exclude-packages to disable smartparens just for the Clojure layer (example in Spacemacs documentation)#2017-06-0712:12Drew Verleethanks @jr0cket#2017-06-0809:12achikinIām trying to run the cider repl from inside spacemacs. It fails with a compilation error and then buffer with the error disappears before I can read the contents. Or itās a minibuffer? Anyway, how can I get the full stacktrace in this case?#2017-06-0809:14achikinIāll answer myself as usual. All repl output goes to minibuffer in this case and all the contents are accessible in Messages buffer.#2017-06-0810:26practicalli-johnny@achikin If I get a strange error I check the repl buffer then messages buffer. If there is nothing there, I jack-in to a simple project that I know works to try narrow down if it's the project or Spacemacs. So far it's always been the project ;)#2017-06-0810:44achikinThank you. It was definitely a project š#2017-06-0920:23jmclavijoHello. Iām trying to use a branch of the Clojure layer that would show Sayid in itās debugger. Iāve updated spacemacs, the packages. Iāve tried to install the Sayid package using M-x package-install sayid, but it says the package is obsolete . I also have Clojure as a layer on my .spacemacs configuration. I donāt see sayid on any keybinding or any of the other newer keybindings in debug. How do I use a different branch?#2017-06-0920:25jmclavijoIs it a configuration in spacemacs or a change in git in the folder for that branch?#2017-06-0920:54jeff.terrell@donyorm Any ideas?#2017-06-0921:44ag@jclavijo fwiw develop branch of spacemacs already includes sayid in clojure layer#2017-06-1000:20jmclavijoag: odd but I canāt get it to work. I did āgit checkout developā it doesnāt work and also I get some other error. Am I missing something?#2017-06-1000:35agwhat doesnāt work git or spacemacs?#2017-06-1423:55jmclavijooh.. It didnāt work when I was checking out the clojure branch of the package, but that was because it wasnāt updating the folder to the most recent ādevelopā branch, but an other older update. I solved the problem though using the suggestion bellow. Thanks.#2017-06-1016:29donyorm@jclavijo as ag says, sayid is only in the develop branch as of now. Check out how to install alternate installations if you want to install the develop branch: https://github.com/syl20bnr/spacemacs#alternate-installations#2017-06-1423:57jmclavijodonyorm: Thanks⦠That did the trick. I was trying to switch to the develop branch on the folder, but that wasnāt setting it to the most recent develop branch. I think that was a git dependency ātrickā. I did what you suggested, installed an alternate folder with emacs, switched to the develop branch and updated the .spacemacs file in that separate folder. Thanks for the suggestion.#2017-06-1500:47donyormI'm glad that helped! #2017-06-1016:30donyormYou could also install sayid in the dotspacemacs-additional-packages variable, but then you wouldn't have the evil keybindings#2017-06-1411:44mike_ananevHi! I'm using Spacemacs and opened two repl processes: 1- jvm, 2-cljs +figwheel. When I send cljs S-exp to REPL I got a stacktrace, cause S-exp is evaluated in JVM repl. How to send CLJS S-exp to appropriate repl?#2017-06-1413:08jstokes@mike1452 I start figwheel from my clj repl via (figwheel-sidecar.repl-api/start-figwheel!) and then the cljs repl with (figwheel-sidecar.repl-api/cljs-repl). if youāve used cider-connect to connect or cider-jack-in to start that clj repl, your cljs forms should be evaluated in that repl#2017-06-1413:23mike_ananev@jstokes Thanks. I've found myself slightly another solution https://middlesphere-1.blogspot.ru/2017/06/spacemacs-cider-2-repls.html#2017-06-1413:24jstokes:thumbsup:#2017-06-1415:35fedregHi all, brand new to spacemacs from vim. How can I remap jk to esc? thx!#2017-06-1415:38Richard(setq-default evil-escape-sequence "jk")#2017-06-1415:39fedregahh I had forgotten the hyphen after setq! Thx!!#2017-06-1415:42Richard(setq-default evil-escape-sequence "jk"
evil-escape-unordered-key-sequence "true"
evil-escape-unordered-key-sequence 0.5)#2017-06-1415:43fedregā¦actually I hadnāt forgotten that but it wasnāt working. I just pasted it in at the top of the init and it works. much to learn#2017-06-1415:43RichardI use ,. instead of jk, because Dvorak.#2017-06-1415:44fedregso the unordered key sequence means I can use kj as well? and the float?#2017-06-1415:47RichardYes. < 0.5 seconds and it will escape. #2017-06-1415:47RichardLonger than 0.5 and it will type jk#2017-06-1415:48fedregExcellent. thanks for the help!#2017-06-1415:48RichardYou're welcome.#2017-06-1416:00RichardTypo! Copied incorrectly as not at my desk -
(setq-default evil-escape-sequence "jk"
evil-escape-unordered-key-sequence "true"
evil-escape-delay 0.5)#2017-06-1417:29fedreg@richard. Thx! Hadnāt copied that portion in yet so no prob. Thanks for the correction!#2017-06-1500:03jmclavijo@fedreg Itās not what you asked, but already a āfdā escape key sequence, but itās great to program another one if youāre right handed just kidding about that last command š#2017-06-1506:37naomarikhas anyone got helm-semantic-or-imenu to show the dispatch type on defmethods?#2017-06-2708:07jumarIs it possible to do a full-text search in all project files and also the source code of libraries used in the project (I assume leiningen)?#2017-06-2708:42donyormWhat are you searching for? , g g can take you to the definition of a specific symbol. Otherwise, I'm not sure#2017-06-2709:45shanSPC / will do a project search with ag but only on your project files#2017-06-2710:11jumarYeah, I know those ones. Sometimes, I need to search for some string in 3rd party libraries - just to explore code or for debugging purposes. I used to use this feature in IntelliJ IDEA#2017-06-2710:37shanMight be worth asking in #cider#2017-06-2713:17practicalli-johnny@jumar if I know the namespace then I use , g n and search / through that list of vars for the namespace. Or generally search documentation using apropos, , h a.#2017-06-2713:29practicalli-johnnyIf you require a namespace for a library once the repl is running then you also get auto-complete for the vars in that library (if you have auto-completion as a layer)#2017-06-2713:43jumarthanks for tips. I'm pretty much aware of those options. However, I was really looking for the option to do some kind of full-text search through all the libraries; or at least through all namespaces/files of given library#2017-06-2713:48jumarI guess it comes down to searching in all jars on a classpath.#2017-06-2713:50jumarIt might sound like a weird requirement, but I used to use this kind of stuff from time to time.
Now, when I use (and love) spacemacs, I'm trying every possible option to avoid using any other editor š#2017-06-2714:09jumarThe best thing I've found so far is to invoke cider-classpath, look for interesting jars and then do zipgrep "search-string" library.jar in eshell#2017-06-2721:30practicalli-johnny@jumar I am curious about what you get from searching through all the libraries in a project, what are you trying to find or understand? I ask to learn if there is something I am missing out on. Thanks#2017-06-2805:29jumar@jr0cket things that come to my mind include:
* searching for any HTTP communication to see possible communication points and how they work including authentication
* searching for password-like fields to be able to mask them in logs
* searching for suspicious log message appearing in my application if I am not able to directly identify the library and/or class/namespace just from the log itself#2017-06-2811:46achikinHi!#2017-06-2811:47achikinSomething strange happens to vim search and replace#2017-06-2811:47achikinI type in :%s/:state/:status/gc and press enter#2017-06-2811:48achikinThen it hops to first occurrence and prompts me with standard Replace :state with :status (y/n/....etc)?#2017-06-2811:49achikinBut when I press y nothing happens and error appears Args out of range (0, 0)#2017-06-2812:41donyormis it possible that : is a special symbol for vim regex? Have you tried escaping it?#2017-06-2813:41achikinNo, that doesnāt help#2017-06-2814:00shanIāve tried it out on a scratch file and it works fine for me as youāve got it#2017-06-2814:00shandoes the same error happen on any search and replace with gc?#2017-06-2814:05jstokesanyone else notice when clicking to open a file in the Recent Files: dropdown, thereās an immediate paste of your clipboard after the file opens?#2017-06-2814:05jstokesonly when clicking with the mouse (enter on the filename doesnāt have the same behavior)#2017-06-2814:11shanyeah Iāve had that#2017-06-2814:13shanStill get weird behaviour now and Iām on version 0.200.9 which is the latest#2017-06-2821:35practicalli-johnny@jstokes yes, clicking on recent files has pasted for a while now. I learned to hit enter instead of clicking. First I press r for recent files, or b for bookmarks, then j or k to move up or down, then enter to open the file#2017-06-2821:36jstokesglad iām not going crazy š
#2017-06-2900:03agalso you can press r to jump to Recent files. or p to Projects#2017-06-2900:07agd takes to to todos and c to Agenda#2017-06-2902:20bjahas anyone else using Spacemacs on Linux found that their github gist region (`SPC g g r`) no longer copies the link to their clipboard? I don't know when exactly this broke, but I do recall that github gist region put the gist link into my clipboard sometime last year#2017-06-2917:31agbja: it appears broken in OSX as well#2017-07-1116:35practicalli-johnnyGithub gist region is again adding the gist URL to the clipboard for region (after updating packages in Spacemacs a few days ago) - at least on my machine š#2017-06-2915:46achikinOn any search and replace in clojure mode.#2017-06-2915:48achikinit happens on any search with c#2017-06-2915:48achikinCan I replace gc with some other emacs functionality?#2017-06-3018:34aliceI want to write a layer as a hook for clojure-mode that will add keybind functionality for smartparens and some custom functions, but I'm unsure of how to do that#2017-06-3020:27aliceOk figured out the layer part but, how do I write a function to disable and enable the layer ;o#2017-06-3022:22agalice: checkout my layer based on official clojure-layer
https://github.com/agzam/dot-spacemacs/tree/master/layers/ag-clojure
maybe it will give you some ideas#2017-07-0113:58practicalli-johnny@U0G75ARHC do you use ag-clojure instead of the clojure layer or do you include both in the dot-spacemacs/layers section?#2017-07-0114:44practicalli-johnnyAh, I see in the layers.el of your package you include the clojure layer. So your ag-clojure layer will load in the clojure layer even if its not in the .spacemacs list of layers. Thats nice.#2017-06-3020:28aliceI have it in my .spacemacs, but it I ever wantt to disable it#2017-07-0121:19practicalli-johnnyalice: I assume if you want to disable your own layer you comment (or delete) the layer name from the layers list in .spacemacs#2017-07-0113:47practicalli-johnny@jstokes If you still want to use a mouse click to open your recent files, you can add the following line to the dot-spacemacs/user-config section of .spacemacs
(define-key spacemacs-buffer-mode-map [down-mouse-1] nil). This seems to stop the yanking of the last kill-ring content into the opened file.#2017-07-0113:52practicalli-johnny@bja I concur, using github gist region SPC g g r leaves me with the highlighted region in the clipboard. Using github gits buffer SPC g g b adds the newly created gist URL to the clipboard though. Seems like a bug (or at least a change in behaviour) with github gist region.#2017-07-0113:53jstokesthat's great, thanks @jr0cket! I usually avoid the mouse but for some reason I've got it engrained to click the first file I open #2017-07-0114:00practicalli-johnnyYep, it took a little focus for me to switch to using r and then pressing Enter. o also opens the file, so your finger has less distance to travel š#2017-07-0114:02practicalli-johnnyIts taken me about 4 weeks to stop using the mouse. As I have a Thinkpad its so tempting as the mouse tip is right there in the middle of the keyboard. I try keep its use to outside of Spacemacs...#2017-07-0309:05shanAnyone done a package update and had the behaviour of SPC k s (sp-foward-slurp-sexp) change in that it no longer adds a space after slurping the next form?#2017-07-1414:45jstokesshan: wondering if you ever figured out what this was. Still see it happening occasionally - annoying to have to manually put in the !#2017-07-1417:00shanNever looked too deeply into this, I just end up adding a space before I do the slurping now#2017-07-0310:27claudiuhi. Anyone have any ideea how I can set sortcut for something like next-layout ? (global-set-key (kbd "M-p") 'spacemacs/layouts-trainsientstate/persp-next)#2017-07-0315:13practicalli-johnny@claudiu I've added the following keybindings in dotspacemacs/user-config section of .spacemacs to cycle through buffers
(global-set-key [C-prior] 'previous-buffer)
(global-set-key [C-next] 'next-buffer)
#2017-07-0315:14practicalli-johnnyI also used a slightly different syntax for smartparens bindings (both approaches seem to work, not sure of the difference)
(define-key global-map (kbd "C-)") 'sp-forward-slurp-sexp)
(define-key global-map (kbd "C-(") 'sp-backward-slurp-sexp)
(define-key global-map (kbd "M-)") 'sp-forward-barf-sexp)
(define-key global-map (kbd "M-(") 'sp-backward-barf-sexp)
#2017-07-0315:18practicalli-johnnyI've also seen Spacemacs specific examples, this one stops the mouse key from calling a function (define-key spacemacs-buffer-mode-map [down-mouse-1] nil)
#2017-07-1414:45jstokesshan: wondering if you ever figured out what this was. Still see it happening occasionally - annoying to have to manually put in the !#2017-07-0505:09michael zhouHi.Anyone have idea why I can not jump to function definition when coding clojure in spacemacs?#2017-07-0508:17jumar@zhoumin79 did you run the repl and eval the buffer?#2017-07-0508:43michael zhouyes,when I press ", g g" ,it shows the error "No jump handler.."#2017-07-0518:15agzhoumin79: I've been trying to ring someone's attention to that issue. "Go to definition" in Spacemacs is so broken right now#2017-07-0518:16agand configuring jump handlers is so tricky#2017-07-0518:33agI've tried to find a way to make it work such the way that it would use cider's jump to definition, and when it's not available it would try using dumb-jump#2017-07-0518:33agBut I couldn't make it work#2017-07-0518:34agThis is so embarrassing. Guys using InteliJ laugh at me#2017-07-0608:57michael zhouNeed to load the namespace before you try to navigate to the code. Good luck!#2017-07-0508:44michael zhouI run Spacemacs in WINDOWS. Thanks.#2017-07-0508:45michael zhou@jumar#2017-07-0508:49jumartry M-x cider-find-var and check if that works#2017-07-0509:23michael zhouIt doesn't work.#2017-07-0509:24michael zhouJetbrains IDEA works, Spacemacs doesn't.#2017-07-0512:23jeff.terrell@zhoumin79 - What happens if you M-x cider-jack-in or , s i?#2017-07-0512:25michael zhou@jeff.terrell - it works#2017-07-0512:28michael zhouclojure code works but cannot jump to definition source code#2017-07-0512:33jeff.terrellOK. I don't know then. simple_smile Maybe ask in #cider?#2017-07-0512:50michael zhouAnyway thank you @jeff.terrell#2017-07-0520:00achikinWhat is āthe right wayā to bind a key to a function in minor mode?#2017-07-0520:01achikinI want TAB to be sp-indent-adjust-sexp when in smartparens-mode. What is the best way to do it?#2017-07-0608:42claudiuHi. Anyone has any ideea how I can search a term from clipboard. ? In vim i pressed / then typed or shift+ins to paste. In space macs can only type, insert does not work.#2017-07-0609:06donyorm@claudiu Ctrl-y pastes in emacs, at least outside of evil mode (like the mini-buffer)#2017-07-0609:09donyormso use / + Ctrl-y to search for what's in your clipboard#2017-07-0610:00practicalli-johnny@achikin you could try add-hook. For example I use (add-hook 'markdown-mode-hook 'turn-on-orgtbl). This runs the function turn-on-orgtbl when I have a buffer in markdown-mode.
So you could try something like (add-hook 'smartparens-mode-hook (lambda () (define-key minor-mode-map (kbd "TAB") 'sp-indent-adjust-sexp))
You might need to unbind an existing keybinding in the major mode first, examples are in this article: http://emacsredux.com/blog/2013/09/25/removing-key-bindings-from-minor-mode-keymaps/#2017-07-0615:29claudiu@donyorm Thank you. That did the trick š#2017-07-1003:26swlabrtyrhello fellow spacemacers, is there an equivalent of C-g in spacemacs?#2017-07-1003:27swlabrtyr^ using spacebar#2017-07-1003:48donyormI always just use C-g#2017-07-1005:23swlabrtyr@donyorm Iām really trying to cut down on the use of my pinky#2017-07-1005:23swlabrtyridk if Iām getting rsi but after ~2 years of use on a macbook pro keyboard my wrist and pinky feel⦠strange#2017-07-1005:24swlabrtyrthis is why I learned vim/evil and eventually switched to spacemacs#2017-07-1005:42donyorm@swlabrtyr so C-g just runs keyboard-quit behind the scenes. keyboard-quit isn't bound to anything but C-g, but you could easily define a different binding in your .spacemacs.#2017-07-1007:51mccraigmccraig@donyorm you have mapped yr capslock key to ctrl, right? ctrl key positioning on mbp is horrible for emacs otherwise...#2017-07-1007:52donyorm@mccraigmccraig I assume you meant to tag @swlabrtyr, I'm not using a mac š#2017-07-1007:53mccraigmccraigdoh, correct @donyorm , that was my pre-coffee comprehension at play#2017-07-1007:59swlabrtyr@mccraigmccraig I do have it to caps lock#2017-07-1007:59swlabrtyrbut the strain is still real#2017-07-1008:00swlabrtyrIāve gone through several iterations, first I just used the ctrl key, then I switched to caps lock, then to vim but missed emacs dearly, then to evil mode, then to spacemacs#2017-07-1008:00swlabrtyrstill getting used to spacemacs, but the less I use my left pinky the better my left pinky feels#2017-07-1008:01swlabrtyritās not debilitation or even painful, just feels weird#2017-07-1008:01swlabrtyrdonāt want it to progress further, itās gotten worse in recent weeks so Iām trying to avoid all pinky use#2017-07-1017:58agswlabrtyr: try Kinesis Advantage#2017-07-1017:58agI've tried many different boards that's the only one that lets me type for 16 hours non-stop#2017-07-1101:40swlabrtyrthanks! I will look into making an investment#2017-07-1008:37practicalli-johnny@swlabrtyr I haven't tested it, but I thought fd or Esc would do the same as C-g.#2017-07-1008:39swlabrtyr@jr0cket thanks! Esc worked#2017-07-1008:40swlabrtyrhas anyone here had any issues with their left pinkies?#2017-07-1009:35malch@swlabrtyr try fd as suggested - works almost everywhere#2017-07-1009:35shanI once read someone used a foot pedal/switch for certain modifiers#2017-07-1009:36swlabrtyr@malch fd doesnāt work for me, but itās alright#2017-07-1009:36swlabrtyrIāve just avoided using my left pinky, fixed my posture and type slower#2017-07-1009:37shanCtrl - [ also works as escape in vim btw#2017-07-1010:18donyorm@swlabrtyr fd does need to defined in .spacemacs IIRC, but it's an incredibly useful shortcut. I would recommend defining.#2017-07-1118:03practicalli-johnnyAny thoughts on the following keybinding I am proposing for Spacemacs
"rck" 'clojure-toggle-keyword-string
This will toggle a string into a keyword and a keyword into a string. A handy shortcut for changing data structure types. Does this sound useful ?#2017-07-1118:17agyou mean SPC rck or you want to introduce a binding that potentially will be conflicting with evil's r motion?#2017-07-1118:20ag@jr0cket#2017-07-1118:36practicalli-johnny@ag Well in full it would be SPC m r c k#2017-07-1119:12zlrththat is, , SPC b to start my command. iād like to just hit , b to start my project.#2017-07-1119:58practicalli-johnny@mfm this may be a long shot, but how about ",b" instead of ", b"- so remove the space#2017-07-1120:30zlrth@jr0cket thatās a great idea! i didnāt notice that.#2017-07-1120:35zlrth@jr0cket your suggestion was key. this works: (define-key clojure-mode-map (kbd ",b") 'start-cider-project)
#2017-07-1120:36practicalli-johnnyor is it simple "b" as you are adding it to a mode#2017-07-1120:36practicalli-johnnycool#2017-07-1120:36zlrthoh shit that adds it to <insert-mode> in evil, too. nevermind.#2017-07-1121:07zlrthok; this should work in anyoneās spacemacs, right?(evil-define-key 'normal lisp-mode-map "b" (lambda () (message "bar")))
for me, b is not overridden.#2017-07-1217:33agheads-up. ELPA is down.#2017-07-1318:17practicalli-johnnyI've added a pull request to spacemacs for the keyword toggle, appearing under the clojure major mode - refactor - clean/cycle/convert menu.
https://github.com/syl20bnr/spacemacs/pull/9225#2017-07-1319:08agjr0cket: That's a neat idea. I'd be great if it could convert all the keys in a map#2017-07-1322:45practicalli-johnnyMaybe it works if all keys in the map selected, I haven't tried. Perhaps give it a try with iedit or multiple-cursors. Or if there is just a few, then search and . to repeat last command. Will give them a try tomorrow#2017-07-1318:19practicalli-johnnyI'm just editing a video to show how I create a pull requests for Spacemacs, almost entirely with Spacemacs (I still push the pull request button on the github website)#2017-07-1413:30practicalli-johnnyHere is the video of how I made the above pull request from within Spacemacs https://m.youtube.com/watch?v=tS9MkQwhSDg and how I updated a pull request based on comments received from the pull request https://www.youtube.com/watch?v=gwFGSVtFrgQ#2017-07-1820:27kurt-o-sysI'm trying to refactor a symbol (rename), but the behavior is a bit unexpected:
1. SPC m r r s
2. symbol to replace
3. new name
4. I get a message that there were 5 occurences found, and in the file I'm working in, it seems it is renamed
However... what actually seems to have happened:
* a new file with the same name in a different directory is created
* the original file is still the same
or: I have 2 files:
1. <project-home>/src/clj/core.clj
2. .boot/cache/..../718/-jnm801/my-project/core.clj
How to make this temporary change permanent?#2017-07-1820:55kurt-o-sys2nd unrelated question: Can clojure/fancify-symbols be extended or customized?
I really like a more symbolic code - it's easier/more relaxed to read. I had some other symbols 'fancified' in vim. I'm working about a year in spacemacs now, and I really miss some of them. The most relevant once, to me:
* and ā§
* or āØ
* not ¬
* let :=
* recur āÆ
* -> ā
* ->> ā
(and I used some for core.async as well)#2017-07-1821:11bja@kurt-o-sys this looks pretty easy to adapt: https://github.com/syl20bnr/spacemacs/blob/master/layers/%2Blang/clojure/funcs.el#L12#2017-07-1821:14kurt-o-sys@bja right... so, you mean forking spacemacs and changing that function? (I'm not used to configuring emacs/spacemacs). Or can I just override/extend that function somewhere?#2017-07-1821:14kurt-o-sys(I mean, forking the whole thing just to add a few lines of code does seem a bit weird to me, so I suppose there's a better way)#2017-07-2018:04practicalli-johnnyIf you create something you want to make part of Spacemacs, then the video I posted here on the 14th walks you through adding a change to Spacemacs. Almost all of it can be done inside Spacemacs.#2017-07-2018:11kurt-o-sysš#2017-07-1821:21bjayou could just add code to your dotspacemacs/user-config#2017-07-1821:22bja(eval-after-load 'clojure-mode '(progn .....))#2017-07-1821:25kurt-o-sysAllright, thx. That'll do, I guess. š #2017-07-1821:43kurt-o-sys(eval-after-load 'clojure-mode
'(font-lock-add-keywords
'clojure-mode `(("(\\(fn\\)[\[[:space:]]" ...
seems to work. Thanks for pointing me there!#2017-07-1911:47kurt-o-sysAnyone an answer to this?#2017-07-1913:21eggsyntax@kurt-o-sys I don't use that one myself -- I use iedit-mode to rename a symbol in the current file, & more greppy search-and-replace tools across files. So...no answer for you, but you could try falling back to one of those.#2017-07-1913:23kurt-o-sys@eggsyntax allright, thx, will check iedit-mode#2017-07-1913:23eggsyntaxSPC s e#2017-07-1913:23eggsyntaxSlight learning curve, but super-effective once you're used to it.#2017-07-1913:38shanhow do you get the renaming to work across files? Is there anything special you need to do? Iām using evil mode btw#2017-07-1913:40eggsyntaxiedit-mode won't work across files, AFAIK. But all the search tools (grep/ag/etc) under SPC s will work for that.#2017-07-1913:40eggsyntaxMostly not semantic-aware renaming, though.#2017-07-1914:30kurt-o-sysOK... I need renaming across files. In-file renaming is easy enough with :%s#2017-07-2102:00kurt-o-sys(I'm not working in core.clj, but it seems it's still somehow doing something with core.clj, and it fails on a clojure.spec definition: (s/def ::config ...))#2017-07-2320:46yaluhelp! I'm getting
Invalid face reference: t [xx times]
continuously in the message buffer when clojure-enable-fancify-symbols
is on.
I'm not sure if it has always been the case (never checked message buffer or noticed it when i did before); or if it is due to recent cider upgrade to London release.#2017-07-2320:47yaluwhen clojure-enable-fancify-symbols is off message goes away and everything is normal.#2017-07-2320:48yaluto reproduce.. just open any clj or cljs file and watch the message buffer side by side.#2017-07-2320:52yaluI filed a bug report as well a little while ago
https://github.com/syl20bnr/spacemacs/issues/9271#2017-07-2522:28agAnyone here use indirect buffers a lot? I remember having specific problem when editing things in a cloned indirect buffer when unbalanced paren makes everything look red (I think it's sp-show-pair-mismatch-face). The problem was - even after fixing unbalanced paren - it wouldn't clear out - bunch of things would stay highlighted red. And I think this would happen only in clojure or clojurescript mode, I don't think I could ever repro it for elisp.#2017-07-2522:28agI've been meaning to submit an issue, but now I can't repro it for Clojure buffers either.#2017-07-2522:29agIs it fixed or there's specific thing that would cause it and I'm not doing it?#2017-07-2618:19rinaldiAnyone else having issues with cider after the last upgrade? It tried to fetch cider-repl using a tag that is not yet available on Clojars.#2017-07-2618:35bjais this develop?#2017-07-2618:37bjaif so, you might need to install cider-nrepl locally until a time comes when a snapshot release is available for 0.15.1-SNAPSHOT#2017-07-2618:37bjai.e. clone this: https://github.com/clojure-emacs/cider-nrepl and then go into the directory and lein install#2017-07-2618:59rinaldi@bja Oh, interesting. I manually changed the cider-version variable which is not ideal. Gonna try your solution.#2017-07-3117:54eggsyntaxAnyone aware of a way to delete a sexp? That is, to delete it without copying it to the kill-ring? Sometimes I just want something gone forever.#2017-07-3117:57eggsyntaxIāve been trying to even come up with a way to do it with an emacs lisp fnā¦I havenāt found a way to kill-into-register, which would work; nor have I found a way to select a sexp (which would mean I could use delete-region).#2017-07-3119:01alandiperteggsyntax to select lists anyway i frequently use % in visual mode#2017-07-3119:02eggsyntaxYeah, that's what I'm currently doing for delete (along with delete-region). But it's not a true sexp operation like kill-sexp is (eg won't work for a keyword, even though a keyword is a valid sexp).#2017-07-3119:03eggsyntaxThere's a sp-highlight-current-sexp command, but it seems to be a no-op for me.#2017-07-3119:10alandiperteggsyntax as for elisp, perhaps a simple function that calls kill-sexp and then pops the kill ring?#2017-07-3119:11eggsyntaxOh, hey, brilliant -- totally didn't think of that, I think that's exactly the optimal solution.#2017-07-3119:13alandipert(defun delete-sexp ()#2017-07-3119:13alandipert (interactive)#2017-07-3119:13alandipert (evil-lisp-state-sp-kill-sexp)#2017-07-3119:13alandipert (pop kill-ring))#2017-07-3119:13alandipertmy pleasure. thank you for the elisp opportunity :-)#2017-07-3119:14eggsyntaxš#2017-07-3119:16eggsyntaxNow bound to A-m (murder-sexp) and works like a charm š#2017-07-3119:22alandipertha, excellent name#2017-07-3120:04pesterhazyhow did I not know about this channel ?!#2017-08-0418:24donyormDoes anyone know, in general, how often spacemacs is updated?#2017-08-0504:10mattlythe develop branch is updated frequently, and the master branch rarely#2017-08-0504:10mattlythere is a lot of stuff on develop that hasnāt made it into master#2017-08-0505:39donyormyeah I know. I might just start running develop...#2017-08-0519:49neeasadedo we have any sort of forecast for release of develop?#2017-08-0605:42ag@neeasade what do you mean? develop doesn't get released. Maintainers just merge whatever they see fit. Couple of things you can do to track things:
a) keep an eye on PRs. You can sort them by recently updated https://github.com/syl20bnr/spacemacs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc. If you want something that you'd be interested in being merged sooner, you can ask directly in PR discussion or in Spacemacs's Gitter channel
b) whenever you pull the latest, you can check what exactly got updated. Essentially it is this command: git log --oneline --abbrev-commit ORIG_HEAD..HEAD#2017-08-0605:44agAlso note that Spacemacs has official Changelog (things that get released into the master branch). To view it right in Spacemacs, you can press SPC f e i then SPC p f #2017-08-0613:02dominicmHow would I yank the symbol/form I am on? or the outer set of parens? There seems to be a special yank for lisp or something?#2017-08-0613:09dominicmCan I use a text object as a region maybe? (Then I'd need a text object for lisp things)#2017-08-0614:15shanare you using evil mode?#2017-08-0614:15shanI usually just do ya(#2017-08-0614:16shanpretty much what ever youād do in VIM#2017-08-0614:19dominicmyes, evil mode.#2017-08-0614:19eggsyntaxAlso the evil-cleverparens project will give you text objects for forms, comments, defns. I donāt use it because it steps on too many of my (somewhat idiosyncratic) key-bindings, but seems like itād be good for most folks.#2017-08-0614:19dominicmIs there an eval operator I could use with those text objects?#2017-08-0614:21eggsyntaxI get that from CIDER, personally. SPC m e gets you to eval-form and related.#2017-08-0614:21eggsyntaxAlternately, SPC m s lets you send forms etc to the REPL.#2017-08-0614:22eggsyntaxcider-eval-last-sexp is slightly imperfect IMO because it requires that you be at least 1 character past the sexp; being on the closing paren doesnāt work.#2017-10-1210:56pesterhazytry the usual - mv ~/.emacs.d/elpa out of the way and restart?#2017-10-1708:27paulspencerwilliamsHi all. Iām fairly new to Emacs. Iāve been playing for a few months and am fairly happy with Cider etc. This week Iāve been playing with Spacemacs and failing dismally to configure to for React with JS syntax highlighting, and especially indenting. Coming from Intellij, Iām familiar with configuring a plugin to point at at projectās .eslintrc file, and all code styles app applied and checked within the IDE. Should I be attempting a similar conceptual approach with Spacemacs, or is it normal to add indent preferences etc to itās configuration? If my eslint --fix works correctly to format my code, should I be trying to configure a feedback cycle with Spacemacs to delegate this? The more posts I read, the more confused due to recommendations using js-mode, js2-mode, react-mode with specific configurations. Anyone know of simple tutorial etc for idiomatic setup, preferably on the vanilla side of Spacemacs?#2017-10-1720:10ag@paulspencerwilliams first of all welcome! I'm glad you have found guts to try out Emacs. By now you probably already realized - It will be a bumpy ride, but if you stay determined and patient - I can promise you someday you'll discover an incredible power.
Unfortunately there isn't a simple "out of the box" recipe for anything. You will have to build your own perfect world yourself. Because what works best for you might be a complete nonsense for someone else.#2017-10-1720:10agyou should join Spacemacs's gitter channel, people are very welcoming there and eager to help#2017-10-1720:14agfor JS setup (or any other lang) probably it's always good to dissect the Spacemacs layer - explore every package individually, and pick and choose what you like. Usually I end up building my own layer that may or may not be dependent on the "official" layer#2017-10-1720:18agfor fixing indentation specifically you can try setting js-indent-level var. Or use editorconfig package.
Whenever I am not sure how to "fix" something in Emacs I always use apropos. in Spacemacs it's SPC F1. So I would use it and type something like: "js indent". And try to set variables. Most of the time you can change things without ever having to restart Emacs#2017-10-1720:19agthere's also @U0CK4CKAP snippet for setting Prettier https://github.com/anmonteiro/dotfiles/blob/master/.emacs.d/customizations/setup-prettier.el#2017-10-1720:19agsomething you might be interested in#2017-10-1714:35jeff.terrell@paulspencerwilliams - I don't know eslint, so you may be trying to do something I don't. But I remember a couple of pain points with using Spacemacs for javascript stuff. One is that I had to set js2-basic-offset to 2, which you can do with M-x customize-option. Another is that I sometimes have to manually enter jsx-mode for a JSX file. I also stifled a couple of warnings (like missing semicolon and trailing comma) through the customize menu. Hopefully that helpsā¦#2017-10-1715:50paulspencerwilliamsCheers for that @jeff.terrell. I did notice discrepancy between statefull and stateless components which may be the jsx mode issue you mention #2017-10-1716:46paulspencerwilliamsIndeed @jeff.terrell, that's related to the problem. I noticed that it was in Javascript-IDE mode when not behaving correctly, and then applying react mode seemed to fix it. I need to get more savvy at ensuring Emacs detects the file correctly and applies the right mode.#2017-10-1718:06jeff.terrellCool, glad I could help. I haven't ever bothered to figure out the cause of the problem with jsx-mode (and will have to also try react-mode). If you find anything out, do let me know. Cheers!#2017-10-1810:46practicalli-johnny@paulspencerwilliams for indenting of javascript, & css its recommended to use a a hook for the specific mode, in this case it would be web-mode-hook. Here is an example of the code I put in dotspacemacs/user-config section of .spacemacs
;; Changing auto indent size for languages in html layer (web mode) to 2 (defaults to 4)
(defun jr0cket-web-mode-indent-hook ()
"Indent settings for languages in Web mode, markup=html, css=css, code=javascript/php/etc."
(setq web-mode-markup-indent-offset 2)
(setq web-mode-css-indent-offset 2)
(setq web-mode-code-indent-offset 2))
(add-hook 'web-mode-hook 'jr0cket-web-mode-indent-hook)
#2017-10-1810:48practicalli-johnnyI have not looked at syntax highlighting for javascript. For css highlighting I added the colours layer which will highlight any colour hex numbers you have in your css styles in the colour they represent#2017-10-1811:54paulspencerwilliamsCheers @jr0cket, Iāll apply that and see how it reflects again react-mode. Iāve still not quite got the major / minor mode deferences clear in my mind. Whatās particularly confusing is that loading up my JS React project, Spacemac defaults to react, but refused to work well with embedded JSX, but by doing a M-x js2-jsx-mode followed by a M-x react-mode thus switching back to react-mode gives be a workable environment. I would expect switching modes, and back again would equate to a no-op, but apparently not š#2017-10-1814:33practicalli-johnnyEmacs has only one major mode active at a time, often these major modes named after the programing language you are using or things like org-mode and magit version control. To add common features in different major modes you can add lots of minor modes. For example, flycheck for spelling.#2017-10-1814:35practicalli-johnnyThe major mode should have the syntax highlighting, formatting rules, etc built in. Along with a menu of all the functions specific to that mode. This can be quite extensive, for example the Clojure major mode includes CIDER and several other Emacs projects. Then you have things like autocomplete as a minor mode. Does that make sense ??#2017-10-1813:05pesterhazyIs there a way to see the "dirty" files in your repository/current project? I often find myself hunting for the location where I made unstaged changes.#2017-10-1813:07eggsyntax@pesterhazy magit-status (`SPC g s` by default)#2017-10-1813:11jumaryes, that's the best think I can imagine. you can use TAB to expand/collapse the changes for quick review (better to go through some quick magit tutorial)#2017-10-1813:08eggsyntaxAssuming you've got git in your dotspacemacs-configuration-layers, that is.#2017-10-1813:08eggsyntaxIf not, I recommend it š#2017-10-1813:13pesterhazy@eggsyntax that's ... pretty much what I was looking for#2017-10-1819:25jeff.terrellCareful, magit might change your life⦠simple_smile#2017-10-1820:07agyup - I confirm. "magit" and "org-mode" have ruined my life - I am now forever stuck in the Emacsland.#2017-10-1822:55practicalli-johnnyOr being elevated to a higher plane of existence as I like to call it :)#2017-10-1901:16eggsyntaxI use magit pretty routinely, but I still do the complicated stuff at the command line. Force of habit, I guess...#2017-10-1901:17ag@eggsyntax you know about existence of ! in magit-status popup - it's awfully nice#2017-10-1901:20eggsyntaxOooh, no, very cool! That may get me to finally switch fully.#2017-10-1901:20eggsyntaxI'm gonna go read the magit documentation, I never actually have...#2017-10-1901:23agWell... to be honest I never have read it. Maybe I should do that too š#2017-10-1905:06bjahas anyone managed to get flycheck-clojure working with spacemacs?#2017-10-1905:11bjaerr, apparently I have to explicitly pick a checker for SPC e b to work#2017-10-1908:43andre.stylianos@bja I had some trouble getting flycheck-joker to work here for clj/cljs. Don't know if it's the same but what I needed to do was adding
(require 'flycheck-joker)
(spacemacs/add-flycheck-hook 'clojure-mode)
(spacemacs/add-flycheck-hook 'clojurescript-mode)
to my dotspacemacs/user-config#2017-10-1908:51pesterhazyfor me (require 'flycheck-joker) is sufficient#2017-10-1911:16jumar@pesterhazy don't you have following in your config?
(add-to-list 'flycheck-global-modes 'clojure-mode)
(add-to-list 'flycheck-global-modes 'clojurescript-mode)
https://github.com/pesterhazy/arena/blob/master/.spacemacs#L446#2017-10-1911:25pesterhazyIt turns out you know my spacemacs config better than me š š#2017-10-1908:51pesterhazyit works great#2017-10-1908:52pesterhazyjoker 0.8.1#2017-10-1909:09andre.stylianos:thinking_face: I thought those last two were needed here to make it work but maybe not, I'll try later without the last two lines š#2017-10-1909:10andre.stylianosbtw, version 0.8.5 was released around two weeks ago, working nicely here#2017-10-1910:13pesterhazyflycheck-joker gives an enormous productivity boost#2017-10-1910:32andre.stylianosIt sure does! It's hard to imagine going without it after I started using it#2017-10-1911:28pesterhazy@andre.stylianos turns out you're right about those config lines#2017-10-1911:38jumarI tried flycheck-joker a while ago and wasn't able to get it work properly. Now I tried again and it's great! Thank you, @andre.stylianos and @pesterhazy#2017-10-1912:20andre.stylianosEnjoy!!#2017-10-1913:56mccraigmccraighmm. just installed flycheck-joker and i get a bunch of errors for valid code... does it need teaching about custom binding macros ?#2017-10-1913:56mccraigmccraigah, yep - https://github.com/candid82/joker#reducing-false-positives#2017-10-1914:01mccraigmccraigbut no way of specifying new macros which have arbitrary bindings vectors š#2017-10-2519:42CandidJoker allows to specify symbols that are introduced by a macro, i.e. {:known-macros [[riemann.streams/where [service event]]]}. Does it not cover your case?#2017-10-2711:54mccraigmccraigi don't think so @U75LX44UA - these are macros which have arbitrary binding vectors - e.g. https://gist.github.com/1b6eefd2d7035a52a3347cdfca69f3fb - here the symbols org-id con-id and msgs are bound by the ddo macro (which is some thin sugar over the funcool/cats mlet macro)#2017-10-2715:24CandidI see. I don't think this can be solved, unfortunately. Too much macro magic š#2017-10-2716:53CandidOh, wait, I just realized that those bindings should work fine in Joker, as long as you add ddo (fully quialified) to :known-macros. I tested it locally and it works (that is, Joker doesn't complain about those bindings). Is it not working for you?#2017-10-2717:53mccraigmccraigoh, right - i must have misread what is possible in the docs then - i'll try it out and report#2017-10-2810:14mccraigmccraigit is now working for me - thanks @U75LX44UA#2017-10-1914:07pesterhazyyeah I just ignore those errors š#2017-10-1914:08pesterhazyjoker also seems not to recognize {:keys [:ns/kw]}#2017-10-2519:56CandidThis should work. Can you provide full example that's not working?#2017-10-2520:20pesterhazyI tried to repro but couldn't #2017-10-2520:20pesterhazyWill post an issue if I see it again#2017-10-3100:17Candidlooks like it was broken for cljs files but worked for clj. Will be fixed in the next release.#2017-10-3106:50pesterhazyAh yes, that must be it. Thanks for building this fantastic tool @U75LX44UA !#2017-10-1914:10mccraigmccraigha, i'm getting about 50% of lines with red-dots... it's pretty much unusable for me š#2017-10-1914:11pesterhazyyou must be a heavy user of macros#2017-10-1914:13mccraigmccraigi have a few macros around which are very heavily used... mostly mlet from cats and some promise error-handling stuff which can't be done as a fn#2017-10-1922:16agjoker is awesome, one thing I couldn't figure out how to make boot.core primitives to be ignored, I added them to :known-macros and tried adding them to :known-tags - they still get higlighted#2017-10-1923:58practicalli-johnny@pesterhazy You can also see changed lines in a buffer using the fringe option in the Git layer
(git :variables
git-gutter-use-fringe t) #2017-10-2009:08pesterhazy@jr0cket yeah git-gutter is great too. it doesn't help you find the locations with many open buffers though#2017-10-2013:22eggsyntaxI would have sworn my spacemacs used to show git changes on the fringe without an extra package, but I can't seem to find that functionality now...#2017-10-2013:22eggsyntaxBTW @ag ok, I'm completely hooked on magit now, it's so much more powerful than I realized š#2017-10-2013:24jeff.terrellI'm going to have to start using magit's ! now too, per @ag's tip. Thanks, @ag! I love good toolsā¦#2017-10-2015:56agoh, well. TBH Magit is probably more awesome than our combined realization of how powerful it is. There are many little gems sometimes waiting there for you to be found. Examples?
Most commands take prefix arguments. e.g. you probably know how to jump to a relevant piece from magit-diff buffer - you select a line and press RET, right? But what if you prefix it? - C-u RET keeps the magit buffer open. Woah, nice!
Or you can toggle options for the refs buffer, maybe you'd like them to be sorted by committer-date?
from: https://git-scm.com/docs/git-for-each-ref
> For sorting purposes, fields with numeric values sort in numeric order (objectsize, authordate, committerdate, creatordate, taggerdate). All other fields are used to sort in their byte-value order.
C-u y r (instead of just y r) - opens nice popup where you can set things right.#2017-10-2016:18eggsyntaxThe way you can set options with - (eg, -f) is awesome too -- mimics *nix command line arguments beautifully & mnemonically, without the awkwardness of trying to add them after the command. That's just a beautiful little bit of UX. So many carefully chosen UX details in magit...#2017-10-2016:19eggsyntaxThat one feels like one where the author must have tried about 10 different things before finally having that lovely little insight.#2017-10-2016:21jeff.terrellI totally agree. If I had lots of time, I'd like to create a spin-off of magit for exploring text-based data using standard unix tools, with that lovely little interface as a friendly introduction to the raw command line. Can you imagine that kind of interface for learning sort's various options?#2017-10-2016:22eggsyntaxOh hell yes.#2017-10-2016:23agOh, yeah. note that you can set options, then press C-c C-c and in most cases (if it's a safe option) - it will store it, so if you want your refs to be ALWAYS sorted particular way C-u y r, set the sort option, C-c C-c - voila#2017-10-2016:23eggsyntaxIf you manage to get to it, LMK, I'd love to try it š#2017-10-2016:30agGuys, guys... in the magit refs popup, press L then toggle details and visibility... cool innit?#2017-10-2016:33eggsyntaxVery nice š#2017-10-2013:26jeff.terrellRelatedly, I just took 15 minutes to read the Spacemacs layouts documentation and fiddle with some things, and I think I may have mostly solved an annoyance I have when viewing my org agenda and making my plan for the day.#2017-10-2013:26eggsyntaxIt actually seems like you need that only for edge cases where the functionality isn't exposed in another way. Highly recommend https://magit.vc/screenshots/ for a quick overview of what magit can do (unless you're already familiar w/ it).#2017-10-2013:26eggsyntax("that" meaning !)#2017-10-2013:27jeff.terrellWow, good quick overview of magit. Nice resource. š#2017-10-2013:27eggsyntaxThey are not kidding when they say it's nearly a 100% replacement for CLI git. A lot of stuff -- eg staging small chunks -- is way easier than with CLI.#2017-10-2013:47jeff.terrellTIL that when my windows get unbalanced, taking up unequal widths despite SPC w =, I can fix it by e.g. sending the rightmost window to the right with SPC w L.#2017-10-2013:57pesterhazy@jeff.terrell there's always golden ratio mode, SPC t g#2017-10-2013:57jeff.terrellOh weirdā¦might try that for a while and see if I can get used to it. simple_smile Thanks!#2017-10-2015:56agoh, well. TBH Magit is probably more awesome than our combined realization of how powerful it is. There are many little gems sometimes waiting there for you to be found. Examples?
Most commands take prefix arguments. e.g. you probably know how to jump to a relevant piece from magit-diff buffer - you select a line and press RET, right? But what if you prefix it? - C-u RET keeps the magit buffer open. Woah, nice!
Or you can toggle options for the refs buffer, maybe you'd like them to be sorted by committer-date?
from: https://git-scm.com/docs/git-for-each-ref
> For sorting purposes, fields with numeric values sort in numeric order (objectsize, authordate, committerdate, creatordate, taggerdate). All other fields are used to sort in their byte-value order.
C-u y r (instead of just y r) - opens nice popup where you can set things right.#2017-10-2015:59agnote that you may need to set evil-want-C-u-scroll to nil - if you want to use C-u for universal argument. Otherwise SPC u works fine#2017-10-2016:05agMagit has gotten so big - now it has it's own extensions. My favorite one is Sean Allred's magithub. - it lets you see pull requests, issues and CI status - all the stuff that you usually see on Github - now you can see all that right in the magit-status buffer. And even more - you can create new issues and PRs - without even leaving Emacs.#2017-10-2016:11jeff.terrellI tried using something like that a year or two back, and I never got it working very well. Do you have much experience with github-related stuff in emacs?#2017-10-2016:14agYeah, magithub works great - it's a bit of a headache to set up the auth - (especially if you use 2FA), but after that - it's totally dope#2017-10-2016:15jeff.terrellOK, good to know, thanks. Might have to check that out.#2017-10-2016:15jeff.terrellI spend more time in Slack than Github though, and I still haven't gotten emacs-slack (or whatever it's called) working, so that might be higher priority in the spacemacs-fiddling queue.#2017-10-2016:19agI've tried using it, but couldn't get used to. I have set-up AtomicChrome, so I can edit any text in the browser. That way I can use Slack client in the browser and still be able to edit text in Emacs - but I couldn't get used to web-app either#2017-10-2016:22jeff.terrellHmm, that's too bad. I heard good things about emacs-slack somewhere, and I was hoping to avoid the current memory hog. But maybe it's not good enough (yet), I dunno.#2017-10-2016:29agI am on Mac. I'm using Hammerspoon and my own config I called Spacehammer (because it is inspired by Spacemacs) - I added some nice things that help me deal with the Slack app#2017-10-2104:47javazquezanyone using holy-mode and would be willing to help find the keybindings for slurp and barf with smartparens. Have always used paredit and just started using spacemacs#2017-10-2214:29agVery often people would ask me: "if you were so happy with Intelij, why have you switched? And how come you never regretted? It has tons of nice features".
In 2012 I have created a ticket, asking them to make it possible to navigate list of completions in intellisence popup without using arrow keys. Maybe C-n/C-p (like in Vim). In April of 2017 maintainer said this:
> "This is a popular request, it might get implemented in future versions. There is no ETA though".
It's almost 2018, some people still finding that ticket and upvoting on it and still waiting. Who still thinks I should've waited too? Because Intellij has ton of other nice features.
#2017-10-2214:31eggsyntaxPretty parallel to clj/s, really -- they're both tools for people who prefer to change something themselves rather than having to wait for someone else to fix it.#2017-10-2214:33eggsyntax(which of course is true of open source in general, but clj/s and emacs both make it easy (and pleasant!) to reshape the tool for your own needs & preferences)#2017-10-2214:35agWell, if your tool isn't perfect but allows you to "bend the rules" it's good enough. But if it's awesome and the creator of the tool says: "you're holding it wrong", "nope, can't bend it" - stop using that tool#2017-10-2214:36eggsyntaxš#2017-10-2306:12jumarThe main two reasons why I still occasionally use IDEA are:
1. Database explorer
2. Java Interop
I absolutely love Spacemacs, but I think the db interaction is more pleasant with IntelliJ's Databse Navigator (I tried ejc-sql) and Emacs/Cider still lacks a good support for quick navigation to Java sources (especially lack of the possibility to automatically download sources of 3rd party libs)
I'm wondering what are your thoughts about this issues and how do you deal with them.#2017-10-2313:42jeff.terrellI don't really do #2. #1 is not something that I do in emacs, nor do I hear of anybody doing that. So sounds like a fair criticism to me.#2017-10-2313:43jeff.terrellYou could always ask on Reddit or something. Might get some good responses.#2017-10-2314:15chrisI was looking into the possibility of #2 awhile back using a combination of cider and meghanada server, but it wasn't going to be as easy as I was hoping, so I sorta gave up#2017-10-2318:43aganyone else having trouble updating packages? I can't download bunch of packages#2017-10-2318:43eggsyntaxI haven't myself (but haven't updated packages very recently), but have heard a few folks say the same thing.#2017-10-2318:44agdammit... my work has come to stalemate ;(#2017-10-2321:05agokay... apparently it was due my own thing in one of my layers. I have noticed a bug a few days ago - basically gg wasn't working anymore in dired buffer. I've trying "fixing" it, but that was upstream bug that when they've fixed it, that made my "workaround" not just obsolete, but completely wrong.#2017-10-2321:06aggod... sometimes Emacs's error messages sooo obscure#2017-10-2321:06agbetter than Clojure stacktraces, yet quite obscure#2017-10-2321:09jeff.terrellGlad you figured it out, but that does sound like a pain.#2017-10-2321:10agoh yeah... I have freaked out... TBH - it's completely my own fault. I really have to stop updating stuff first thing in the morning. But I can't. My OCD just wants everything latest.#2017-10-2321:18agthat taught me the lesson I have forgotten. I haven't had issues like this for very, very long time. I've been using Spacemacs for maybe like more than 3 years. The lesson is: whenever there's something wrong, disable all the layers, and if that works - try adding them one by one, until you find the culprit#2017-10-2321:19jeff.terrellBisection by layers, good idea, I like it. š#2017-10-2401:28eggsyntaxāI really have to stop updating stuff first thing in the morning. But I canāt. My OCD just wants everything latest.ā
Been there done that, feeling your pain š¤#2017-10-2401:29eggsyntax& seconding the layer bisection. Another surprisingly good option is the profiler ā I expected it to have a massive learning curve, but it actually gave me readable info pretty easily.#2017-10-2403:40agalright... I totally and completely forgot about existence of the profiler. #2017-10-2401:40jeff.terrellThat's good to know, that the learning curve isn't bad. Filing that one away for future reference. That's how you figured out that aggressive-indent was your lagging culprit, right?#2017-10-2414:34eggsyntaxYep#2017-10-2707:12jumarI always have trouble to remember some keyboard shortcuts, especially for some cider modes - debugger, spec inspector, etc.
Is there a way to show current key bindings, e.g. when in the middle of debugging a function to avoid going through https://cider.readthedocs.io/en/latest/debugging/?#2017-10-2710:38orestisI have to say, Spacemacs + Cider is much more enjoyable than trying to set Cursive app with IntelliJ.#2017-10-2710:46orestisHowever, I have this annoying thing that sometimes I want to get out of some mis-typed command and press ESC many times, then eventually all the windows will disappear and one buffer (usually cider-error) will take over my frame. Is there any way to get back to my previous windows arrangement?#2017-10-2714:28eggsyntax@jumar yeah -- there's stuff under SPC h d. In particular, SPC h d b (describe-bindings) is the thing you're looking for. It's a bit overwhelming, though, so you might want to play with the other stuff in that section. Some modes use ? to show mode-specific bindings, but it's not consistent.#2017-10-2714:28eggsyntax@orestis yeah, actually! winner-undo is exactly that, undo the last buffer/layout/window change.#2017-10-2714:29eggsyntaxAlso SPC w m toggles maximize-buffer, so if you were taken to the full-frame state via maximize buffer, that'll often change you back to where you were.#2017-10-2714:29eggsyntaxHaving an independent undo stack for UI changes is a kickass idea IMHO and I wish other tools would adopt the same thing š#2017-10-2714:32jumar@eggsyntax thanks for the tip. I guess that's the same as Emacs's C-h b. You're right that there's a sectoin about cider--debug-mode. However, that's not terribly useful:#2017-10-2714:32eggsyntaxWhoa, weird, never seen that one.#2017-10-2714:33eggsyntaxYou know there's also a little thing in the buffer you're debugging that shows you the main commands? It can be easy to overlook; placement is often at the top of the fn you're debugging.#2017-10-2714:34jumarFabulous! I don't know how could I missed that. Thanks a ton.#2017-10-2714:35eggsyntaxAnytime!#2017-10-2714:33eggsyntaxeg n)ext, q)uit, l)ocals ...#2017-10-2714:33orestisThanks! Iāve starred this to keep track š#2017-10-2715:06eggsyntaxmagit question -- as mindblowing as magit is, I have one minor use case I keep tripping over -- sometimes I s)tage a hunk, only to realize it included something I didn't want to stage yet. So I have to go up to the filename, tab-collapse it, go to the staging section, tab-expand the same filename, and u)nstage it, then tab-collapse, go back to the unstaged section, tab-expand, and find the hunk again.
Is there some way to just undo the last staging-action? Or some other quicker way to reverse the premature stage?
Esp @ag since you've become our de facto magit expert š#2017-10-2715:34agI'm not sure exactly how to do that. It's probably possible. I bet you'd be interested to learn about so called wip modes https://magit.vc/manual/magit/Wip-Modes.html thought#2017-10-2715:44eggsyntaxI'll check it out (ha ha no punintended). Thanks!#2017-10-2718:14jeff.terrell@eggsyntax - I don't know of an "magit undo stage" command, but I do know of some shortcuts that might make that a little less painful.
(1) You can hit 1, 2, 3, and 4 to change the display level of whatever the cursor's at. So instead of tabbing around, you might be able to just say e.g. 1 to collapse it all the way.
(2) You can select specific lines to stage or unstage with v.#2017-10-2718:14eggsyntax#2 I use & is maybe my single favorite thing about magit š
#1 is brand new & def will save some time. Thanks!#2017-10-2718:38agHey don't forget about M-1..4#2017-10-2718:42eggsyntaxHmm...for me that does the same as just 1..4, without meta.#2017-10-2718:42agM-1 in magit-diff buffer should be bound to (magit-section-show-level-1-all)#2017-10-2718:43agmeaning M-1..4 toggles ALL the sections#2017-10-2718:44eggsyntaxOhhhh, gotcha. I happen to have only unstaged changes at the moment, so I didn't notice the difference.#2017-10-2718:45jeff.terrellAh, that's really good to know! Is that only the diff buffer, not the status buffer?#2017-10-2718:47agno it works everywhere#2017-10-2718:47agYeah, it's a killer feature. In the beginning I didn't use magit-diff buffer much. I would find a hunk and press e and compare things in ediff. That's handy. But then I did two things:
- I have changed the colors to make the diffs more readable
- I started using 1..4 and M-1..4#2017-10-2718:49jeff.terrellThat's really good to know. I'm always wanting to do that in a magit diff buffer. I usually go to the last line and hit 1..4, which I think has the same effect, but no longer!#2017-10-2718:50eggsyntaxNice. Want to pass along the color portion of your config?#2017-10-2718:51aghttps://github.com/agzam/dot-spacemacs/blob/master/themes/base16-ocean-dark-theme.el#L575-L584#2017-10-2718:53eggsyntaxAwesome, thanks! Yours I may go through in detail š#2017-10-2718:51eggsyntaxThe only color change I've thought of doing is making the hunk headers stand out more -- they're easy to overlook, which is how I get myself into the fix I mentioned earlier where I've staged more than I meant to..#2017-10-2718:55agChoice of the color-theme itself deserves a conversation. For a long time I've been searching for perfect one, something I would really like - I used Obsidian, then I switched to Zenburn (because it was the most popular Emacs theme). Then one day I realized - the less colors you have, the less strained your eyes would be. That's how Spacemacs' default themes do too. But the dark one has way to much pink to my taste.#2017-10-2718:56eggsyntaxHuh, interesting. "the less colors you have, the less strained your eyes would be." Is there evidence for that? It's not immediately obvious to me that it's true.#2017-10-2718:56eggsyntaxI don't like a zillion colors, but I like to be able to distinguish the various things that can be colored differently.#2017-10-2718:57agAfter all I have decided to stop trying and now I'm using Base-16 Ocean Dark (with my own customizations) and Spacemacs' default light theme. This is perfect combination for me. Whenever it's too bright in the room and there's too much glare I would do SPC T n and switch to the light theme and vice-versa#2017-10-2719:01ag> Is there evidence for that?
this is very subjective and YMMV, but the right choice of a font and the color theme is like choosing a knife for cooking. With a perfectly balanced knife you can cook with pleasure for hours.#2017-10-2719:01eggsyntaxOh, 100% agreed on that.#2017-10-2719:02eggsyntaxI haven't noticed more colors being more tiring, but I'll start keeping an eye on it.#2017-10-2719:02agI can't recommend this thing enough https://chriskempson.github.io/base16/#2017-10-2719:03eggsyntaxI have a strong preference for muted colors, though; for me it seems to be bright, vivid colors that wear me out. Especially when they're not within some sensible color palette.#2017-10-2719:03eggsyntaxYeah, for me base16 is actually probably too bright.#2017-10-2719:03eggsyntaxI did the two solarized ones for a looong time, now I'm on zenburn for dark.#2017-10-2719:03agplease try it, find your perfect theme, sprinkle it with your customizations - ahhh... that's like getting married to a woman you love#2017-10-2719:03eggsyntaxOh, for SURE š#2017-10-2719:04eggsyntaxI've spent many, many hours on that over the years. Solarized is tough to beat IMHO; I just finally got tired of it in the last year.#2017-10-2719:04agI do prefer "pastel" colors myself. Don't like too vibrant#2017-10-2719:04eggsyntaxFont, too, for me.#2017-10-2719:05eggsyntaxDrives me MAD to program all day in a bad font.#2017-10-2719:06chrisfor me, the best part about solarized isn't that it's amazing or the best or anything, it's that it's available everywhere, for every platform and editor you could want#2017-10-2719:06chrisand you know it'll look fine#2017-10-2719:06chrisdon't have to fuck with it, just set it any forget it#2017-10-2719:06eggsyntaxI do love that...although it's part of what led to me getting tired of it, I think; I was using it everywhere.#2017-10-2719:07eggsyntaxBut it took > 5 years for that to happen.#2017-10-2719:09jeff.terrellI haven't gotten tired of Solarized yet, but I'm enjoying the conversation and might have to fiddle with it someday. simple_smile#2017-10-2719:10agsolarized is nice - I used it for quite awhile. But I think I'm too picky. Too much blue and green - makes me depressed, too much red and yellow - my eyes get tired.#2017-10-2719:13agWhen it comes to Font: I've tried Menlo, Ubuntu Mono, Input, Kermit, Source Code Pro. I really liked Input. Today I'm using Source Code Pro. From time to time I get bored and try a different font. I think I spend too much time trying to improve my productivity.#2017-10-2719:13agWay too much.#2017-10-2719:13chrisfira code for me#2017-10-2719:13agSo it actually becomes really counterproductive#2017-10-2719:13chrisā¤ļø ligatures#2017-10-2719:14eggsyntaxSource Code Pro is my 2nd favorite, these days; Hack has become my #1.#2017-10-2719:14chrisI'm not that picky, I just need a dotted or slashed zero and ligatures#2017-10-2719:14agyeah, that's something I have to yet to try to get used to. I don't like ligatures. I don't know why. Maybe just need to try it for a week or so#2017-10-2719:14eggsyntaxBut same, I've probably tried a couple dozen over the years...#2017-10-2719:15eggsyntaxI did switch to Fira Mono on mac, because oddly, I got a significant speed boost from it (a tip buried in one of the endless how-to-speed-up-spacemacs threads)#2017-10-2719:15eggsyntax@chris is there a difference between Fira Mono and Fira Code?#2017-10-2719:15chrisfira code has ligatures, mostly#2017-10-2719:16chrisit also changed a few symbols to clear up a couple things#2017-10-2719:16eggsyntaxOh, that's tonsky's, right?#2017-10-2719:16chrislike, the angle bracket characters look different than fira mono to make them a little more distinctive, it's mostly just little tweaks#2017-10-2719:16chrisyep#2017-10-2719:17eggsyntaxI did like that one. I can't recall testing it for speed vs Fira Mono, but my guess is that I didn't get the speed boost or I would have used it.#2017-10-2719:18eggsyntaxI liked Inconsolata a lot, too; that's probably my 3rd fave.#2017-10-2719:18chriswell, you also have to add a bunch of hackish things to get emacs to render ligatures correctly#2017-10-2719:18chrisso, I can imagine that if you were just browsing around with fonts that probably wouldn't have appealed too much#2017-10-2719:20eggsyntaxNo, I definitely remember using it & liking it. It just didn't quite end up as one of my top couple.#2017-10-2719:20eggsyntaxAnd didn't give me the speed boost, I think (which was the only reason I switched on mac).#2017-10-2723:15agGodddammit... I still can't understand why nobody has found a way to fix this thing. Why the heck we can't just go back to the definition? spacemacs-jump-handlers for clojure modes simply broken and I really hate that. This is the only thing where I can't win the argument against IntelliJ#2017-10-2723:15agbecause in Intellij in simply works.#2017-10-2723:21agThe thing that pisses me off the most is my own laziness and inability to write an elisp function that would try to use cider-find-var and if for whatever reason it fails to find correct definition - it would fall back to dumb-jump-go.#2017-10-2723:22agbecause dumb-jump-go works fine in like 80% of cases#2017-10-2801:23agalright... sorry for the rant. I think I got it.
preamble:
This is applicable for Spacemacs, and maybe to some degree to non-Spacemacs configs.
"go-to-definition" or
g d and , g g in Clojure modes for Spacemacs don't work reliably.
g d works only and only if you are jacked-in. But even then it doesn't work in cljs, cljc files, cider-repl.
and sometimes it prompts for the symbol (it simply wouldn't recognize it) - stupid thing
so, solution? Maybe for whenever cider cannot jump to a definition is to use dumb-jump ? it is stupidly simple and works in most cases
But that turned out to be not so trivial to set the way so it would work in Spacemacs. Here's how I did it:
(defun clj-find-var ()
"Attempts to jump-to-definition of the symbol-at-point. If CIDER fails, or not available, falls back to dumb-jump"
(interactive)
(let ((var (cider-symbol-at-point)))
(if (and (cider-connected-p) (cider-var-info var))
(unless (eq 'symbol (type-of (cider-find-var nil var)))
(dumb-jump-go))
(dumb-jump-go))))
(with-eval-after-load 'clojure-mode
(add-hook 'clojure-mode-hook #'spacemacs//init-jump-handlers-clojure-mode)
(add-hook 'clojurescript-mode-hook #'spacemacs//init-jump-handlers-clojurescript-mode)
(add-hook 'clojurec-mode-hook #'spacemacs//init-jump-handlers-clojurec-mode)
(add-hook 'cider-repl-mode-hook #'spacemacs//init-jump-handlers-cider-repl-mode)
(dolist (x '(spacemacs-jump-handlers-clojure-mode
spacemacs-jump-handlers-clojurec-mode
spacemacs-jump-handlers-clojurescript-mode
spacemacs-jump-handlers-clojurex-mode
spacemacs-jump-handlers-cider-repl-mode))
(set x '(clj-find-var))))#2017-10-2801:23eggsyntax@ag sweet, I'll give that a try for myself. Wouldn't surprise me if the spacemacs folks would really appreciate that as a PR.#2017-10-2801:25agyeah, I will try to get it out, maybe someone smarter than me can help me to fix it better#2017-10-2801:32eggsyntaxWorks perfectly so far, and initially seems faster than jump-to-definition#2017-10-2803:13agI made a PR https://github.com/syl20bnr/spacemacs/pull/9792#2017-10-2816:10eggsyntaxShould have named it jump-of-indeterminate-intelligence š#2017-10-2816:12agintellij-gloat-killer#2017-10-2918:23jeff.terrellTIL about SPC c C and SPC c r to set a "compile" command and reinvoke it. Very handy to avoid extra keystrokes for fast feedback on this .tex file I'm working onā¦#2017-10-2921:19agyou're not using org-mode for LaTeX?#2017-10-2921:19jeff.terrellNoā¦working on my CV and needing more control than that.#2017-10-2921:35agoh, wow. I didn't even google, it came up in my twitter feed. so relevant. https://www.reddit.com/r/emacs/comments/79fo9t/latex_in_org_mode_or_pure_auctex#2017-10-2921:53jeff.terrellHmm, thanks for the link. I might have to investigate AucTeX at some point if I have to do much more of this. I haven't investigated much, but it looks like Spacemacs doesn't have a layer that includes AucTeX.#2017-10-3009:36pesterhazy@jeff.terrell I guess "compiling" could be used for any sort of transformation#2017-10-3114:01zaneFor some reason cider-connect is now auto-filling the wrong port for a server I started with lein repl :headless. Has anyone experienced that kind of bug before / know of a fix?#2017-10-3115:58eggsyntax@zane Oooh, a long time ago, don't remember much about it now. The 1st thing I'd do is verify that there are no other lein processes running -- I've tripped over leftover processes before. And maybe a lein clean because it never hurts š#2017-10-3116:03chris@zane: check ~/.lein/nrepl-port#2017-10-3116:03chrisas @eggsyntax said, you could have other processes running. If you're sure you don't you can try removing the nrepl-port file and restarting your repl#2017-10-3118:11reefersleepIs there a way to avoid the recent javax.xml.bind exception when starting up a cider repl? https://dev.clojure.org/jira/browse/CLJS-2377#2017-10-3118:11reefersleepI see that there are some args that you can add in the repl command line, but I donāt know about Cider/Spacemacs#2017-10-3121:43reefersleepManaged to find a solution in #cider , btw. :jvm-opts [ā--add-modules=java.xml.bindā] in my project.clj solved the issue š#2017-11-0220:23Drew Verleesuggestions welcome. Whats the best way to manipulate Clojure data with an editor? I see there are some options are there but im not sure how easily the integrate with Spacemaces or how hard it would make them work in that env.
1. Paredit comes out of the box
2. Evil Lispy
3. ???
I was using parnifer but i feel like at some point i want to take the time to learn something that edits the s-expressions directly.#2017-11-0220:51agI use the second option with added keybindings for insert-mode:
(dolist (map (list evil-insert-state-map))
(define-key map "\M-l" 'sp-slurp-hybrid-sexp)
(define-key map "\M-h" 'sp-forward-barf-sexp)
(define-key map "\M-L" 'sp-backward-slurp-sexp)
(define-key map "\M-H" 'sp-backward-barf-sexp))
#2017-11-0221:42eggsyntax@drewverlee the built-in cleverparens layer (basically paredit w/ custom SM bindings) is quite solid . I've been happy with that for quite a while (although I just started trying parinfer w/ SM).#2017-11-0221:42eggsyntax& the integration is nice & tight.#2017-11-0221:43eggsyntaxMost of it's all right there under SPC k#2017-11-0221:58agI always wanted to try cleverparens but couldn't find time to play with it. @eggsyntax you say the package that good? I definitely gotta try it out#2017-11-0221:59eggsyntaxWell, I mean, it's pretty much just paredit š#2017-11-0221:59eggsyntaxJust with nicely-integrated bindings.#2017-11-0222:00agI've tried parinfer - but I just couldn't get used to it... - way too smart for its own good#2017-11-0222:01eggsyntaxDefinitely takes getting used to. The 1st time I tried it, I was on a tight deadline & couldn't afford to have it breaking my code. This time I've been able to slow down slightly & have been enjoying it. Dunno whether I'll ultimately switch or not.#2017-11-0222:03agare you talking about parinfer or cleverparens?#2017-11-0222:03eggsyntaxparinfer.#2017-11-0222:04eggsyntaxCleverparens/paredit happily lets me break my own code, but only parinfer will break it for me š#2017-11-0222:04aghave you seen Shaun's talk from Conj? He was demoing "smart mode of parinfer"... I dunno when that comes to Emacs#2017-11-0222:05agstill feels a bit too "magical" I dunno if I want to give that much control to my editor#2017-11-0222:05eggsyntaxYeah, I watched him give it -- smart mode definitely seems like a cool step forward š#2017-11-0222:05eggsyntaxFor me, I think it'll ultimately depend on whether it insists on doing stuff that I don't like. If it's consistent about doing what I would have done anyway, I'll probably be happy with it.#2017-11-0222:07eggsyntaxSo far I've only noticed a couple of differences, mostly around placement of line comments at the end of a fn. (I would tend to put the parens after the comment; parinfer does the opposite).#2017-11-0223:35Drew VerleeThanks for the feedback#2017-11-0223:37Drew VerleeI wish the new parnifer mode was on spacemacs#2017-11-0223:45eggsyntax@drewverlee it is, if you switch to the develop branch (which is easy, just git checkout develop from inside ~/.emacs.d).#2017-11-0223:46eggsyntaxNote that there are a few configs you'll want to set at the same time as you turn it on, see .#2017-11-0314:34novelI was also contemplating of switching to develop because of Parinfer, but it looks that 0.300 is almost ready for release: https://github.com/syl20bnr/spacemacs/blob/65d5e42b8ea603abe25cbf3a832a204c15aeedd8/core/info/release-notes/0.300.txt#2017-11-0315:17orestisIs there a way to āstashā all open buffers so I can switch to a new project without accidentally open an unrelated buffer?#2017-11-0315:18orestisIn other editors Iād just start a new instance, but with emacs I do āemacsclient -n .ā to open the current directory; the problem is, all my previous buffers are still there.#2017-11-0315:39leoThere is a M-x helm-persp-switch-project to create a new layer to your project, to switch between then use M-x layouts-transient-state#2017-11-0315:41leoSPC p l and SPC l respectively#2017-11-0317:02ag@U7PBP4UVA so this is little script I wrote awhile ago:
#!/bin/bash
# Selected options for "emacsclient"
#
# -c Create a new frame instead of trying to use the current
# Emacs frame.
#
# -e Evaluate the FILE arguments as ELisp expressions.
#
# -n Don't wait for the server to return.
#
# -t Open a new Emacs frame on the current terminal.
#
# Note that the "-t" and "-n" options are contradictory: "-t" says to
# take control of the current text terminal to create a new client frame,
# while "-n" says not to take control of the text terminal. If you
# supply both options, Emacs visits the specified files(s) in an existing
# frame rather than a new client frame, negating the effect of "-t".
# check whether an Emacs server is already running
pgrep -l "^Emacs$" > /dev/null
# otherwise, start Emacs server daemon
if [ $? -ne 0 ]; then
## get the path to emacs-app
open -g $(brew info emacs-plus | sed -n '4p' | sed 's/ .*$//g')/Emacs.app
sleep 15
emacsclient -e "(progn (persp-add-new \"$(pwd)\") (persp-switch \"$(pwd)\"))"
# exit 1
fi
# return a list of all frames on $DISPLAY
emacsclient -e "(frames-on-display-list)" &>/dev/null
# open frames detected, so open files in current frame
if [ $? -eq 0 ]; then
emacsclient -e "(progn (persp-add-new \"$(pwd | grep -o '[^/]*$')\") (persp-switch \"$(pwd | grep -o '[^/]*$')\"))"
emacsclient -n -t $*
# no open frames detected, so open new frame
else
emacsclient -e "(progn (persp-add-new \"$(pwd | grep -o '[^/]*$')\") (persp-switch \"$(pwd | grep -o '[^/]*$')\"))"
emacsclient -n -c $*
fi
#2017-11-0317:03agif you put it say in ~/.ec and `alias ec='~/.ec'` then you can do something like cd ~/proj & ec .#2017-11-0317:04agit will create a spacemacs layout for the project#2017-11-0317:04orestisWow thanks! Iāll test it out ASAP.#2017-11-0317:05agthe script can be improved - I just haven't had time to do it. I've been using eshell lately, so I almost don't use it anymore#2017-11-0315:19eggsyntaxI actually do generally start new instances for separate projects, although I'm sure there's a more emacsy way to do it.#2017-11-0317:09ag@eggsyntax use layouts aka perps#2017-11-0318:12bjaeveryone is excited about parinfer and I'm 95% fed up with lisp state enough to attempt porting vim-sexp#2017-11-0318:12bjathat's the only part of vim I miss#2017-11-0318:14jeff.terrellI haven't heard of vim-sexp before. What are your pain points for evil-lisp-state @bja?#2017-11-0318:14bjathat it doesn't compose very well with evil#2017-11-0318:14ag@bja have you tried cleverparens?#2017-11-0318:14agI haven't tried myself, just asking#2017-11-0318:14bja@ag I have not, I'll give that a try#2017-11-0318:15agthere's an official layer for spacemacs#2017-11-0318:15jeff.terrell@bja - I don't have that pain at present, but I'm definitely open to an alternative approach. I may just not know what I'm missing.#2017-11-0318:16bjaI used vim for about 15 years. I've become very accustomed to using motions and operators as the basics of my editing experience. vim-sexp added sexp-aware motions#2017-11-0318:17jeff.terrellYou have my attention.#2017-11-0318:17jeff.terrellThat does sound cool.#2017-11-0318:18bjathe default lisp-state mostly works#2017-11-0318:18ag@bja anything vim can do we can do better. (like in the song) š#2017-11-0318:18bjalike, once you define an eval operator#2017-11-0318:18bjayou can just enter visual state and use lisp-mode to select whatever#2017-11-0318:18bjaand then invoke the operator#2017-11-0318:18bjaand you can still do things like select a couple graphs and send them via the operator#2017-11-0318:19bjabut selecting something in VISUAL is a wasted extra step.#2017-11-0318:19eggsyntax@bja I've got an eval-region defined; I can dig that up if you want.#2017-11-0318:19bjaI have a generic eval-region#2017-11-0318:19eggsyntaxAlthough I haven't ended up using it much.#2017-11-0318:20bjabut the paint point is that I want to select using evil commands without prefixing everything with a V so that my selection is put somewhere something like cider-eval-region can find it#2017-11-0318:21jeff.terrellLike <eval-motion>a) to evaluate the present s-expression?#2017-11-0318:21bjaI can do this pretty easily:
(defvar spacemacs--generic-eval-region-alist
'((clojure-mode . cider-eval-region)
(emacs-lisp-mode . spacemacs//emacs-lisp-eval-region-and-print)
(python-mode . python-shell-send-region)
(lisp-mode . lisp-eval-region)))
(defun spacemacs//get-eval-region-for-current-mode ()
(interactive)
(catch 'break
(dolist (test spacemacs--generic-eval-region-alist)
(let ((mode (car test))
(val (cdr test)))
(when (and (symbolp mode)
(derived-mode-p mode)
(symbolp val))
(throw 'break val))))))
(defun spacemacs//generic-eval-region (beg end)
(interactive)
(let ((f (spacemacs//get-eval-region-for-current-mode)))
(when (functionp f)
(funcall f beg end))))
(evil-define-operator spacemacs//generic-evil-eval-operator (beg end)
(spacemacs//generic-eval-region beg end))
#2017-11-0318:21bjayes#2017-11-0318:21bjaI bind it to something else, but yeah#2017-11-0318:22bjathe thing is, I want better support for motions in ways that are more natural to evil#2017-11-0318:22bja(I define the stuff generically because I hate having separate keybindings for different languages)#2017-11-0318:22eggsyntaxYeah, I've got a pretty similar eval-operator defined, but it's not great with recognizing the beginnings and ends of sexps.#2017-11-0318:23eggsyntaxSo I can do, eg <alt> e % from a paren to say (effectively) eval around paren, but it's a bit wonky.#2017-11-0318:24bjaI do V%<EVALOP> a lot#2017-11-0318:24bjaerr, V#2017-11-0318:25bjabut I can also do , , %#2017-11-0318:25bjawhich is my eval operator#2017-11-0318:25eggsyntaxso I don't actually need to use visual mode...another example, I can do <alt> e a ] for eval-around-square-brackets, or <alt> e $ for eval to end of line. Is that how yours works as well? I'm just not clear on the issue w/ visual mode.#2017-11-0318:26eggsyntax(I could decipher it from your code, but it'd take me a while, my emacs-lisp-fu isn't that hot)#2017-11-0318:26bjaI think mine does the same thing (I just tested ,,a] )#2017-11-0318:26eggsyntax:thumbsup:#2017-11-0318:26eggsyntaxThat's the best I've been able to do; if you find something better, I'd love to hear abuot it.#2017-11-0318:26bjabut the selection of sexps isn't as crisp as I'd like in evil. Maybe cleverparens can help with that#2017-11-2211:57sam16created a new project called try-ac#2017-11-2211:57jumarit used to be the case that you had to add cider-nrepl & company to your profiles.clj but everything is injected automatically by cider now#2017-11-2211:57sam16and just opened it now creating a local repl and will try to connect it in spacemacs and then tell you in a min#2017-11-2211:58sam16no fruits#2017-11-2211:59jumardo you have auto-completion in dotspacemacs-configuration-layers#2017-11-2211:59jumar?#2017-11-2212:00sam16yes i do have wait i will share my config-layers too#2017-11-2212:00jumarotherwise I ran out of ideas#2017-11-2212:00sam16ivy
auto-completion
better-defaults
emacs-lisp
git
markdown
(org :variables
org-enable-github-support t)
sql
nginx
javascript
yaml
html
csv
clojure
(shell :variables
shell-default-height 30
shell-default-position 'bottom)
spell-checking
syntax-checking#2017-11-2212:00sam16my layers#2017-11-2212:03sam16have you added this line (global-company-mode t)?#2017-11-2212:03jumarno#2017-11-2212:03sam16in user-config#2017-11-2212:04sam16wait i will disable it and restart emacs#2017-11-2212:04sam16spacemacs*#2017-11-2212:04jumarif that's of any use for you, then here's my (almost complete) user-config
;; of Emacs functions like `get-buffer-window`
(setq source-directory "/Users/jumar/workspace/emacs/emacs-sources/emacs-25.2")
;; for some reason setting source-directory didn't help Spacemacs to find proper sources
;; although it should:
(setq find-function-C-source-directory "/Users/jumar/workspace/emacs/emacs-sources/emacs-25.2/src")
;; set indent level to 2 for pascal (default is 3) since this is the standard indentation
;; suggested by coding style
(setq pascal-indent-level 2)
;; web mode indentation is 2 spaces - HTML, CSS, JavaScript
(setq js2-basic-offset 2)
(setq js-indent-level 2)
(setq css-indent-offset 2)
(setq web-mode-markup-indent-offset 2)
(setq web-mode-css-indent-offset 2)
(setq web-mode-code-indent-offset 2)
(setq web-mode-attr-indent-offset 2)
;; skewer for live editing HTML, CSS, JavaScript
;; ?
;; (skewer-setup)
(add-hook 'js2-mode-hook 'skewer-mode)
(add-hook 'css-mode-hook 'skewer-css-mode)
;; this is different from standard `html-mode-hook` used by `skewer-setup` by default
(add-hook 'web-mode-hook 'skewer-html-mode)
;;; CIDER
;; cider pretty print to avoid large strings freeze the REPL
;; check
;; you can also use M-x cider-repl-toggle-pretty-printing RET
(setq cider-repl-use-pretty-printing t)
;; save history to file:
(setq cider-repl-wrap-history t)
(setq cider-repl-history-size 1000)
(setq cider-repl-history-file "~/.cider-repl-history")
;; cider debugger - greater output length; default is 10
(setq cider-debug-print-length 30)
;; eclim for java code completion:
eclim-executable "~/tools/java/eclipse/Eclipse.app/Contents/Eclipse/eclim"
eclimd-executable "~/tools/java/eclipse/Eclipse.app/Contents/Eclipse/eclimd")
;; clojure syntax checking using flycheck-joker:
(require 'flycheck-joker)
(spacemacs/add-flycheck-hook 'clojure-mode)
(spacemacs/add-flycheck-hook 'clojurescript-mode)
;; and
;; (eval-after-load 'flycheck '(flycheck-clojure-setup))
;; (add-hook 'after-init-hook #'global-flycheck-mode)
;; sayid tracing support:
(eval-after-load 'clojure-mode '(sayid-setup-package))
;; java class files diassembler
;; without this, automatic disassembling doesn't work
(require 'autodisass-java-bytecode)
;;; projectile
;; automatically create test file if it's missing
(setq projectile-create-missing-test-files t)
#2017-11-2212:05sam16tysm i will check#2017-11-2212:05jumarand here are my layers
(
graphviz
nginx
haskell
csv
asciidoc
yaml
python
javascript
php
sql
html
markdown
clojure
;; ----------------------------------------------------------------
;; Example of useful layers you may want to use right away.
;; Uncomment some layer names and press <SPC f e R> (Vim style) or
;; <M-m f e R> (Emacs style) to install them.
;; ----------------------------------------------------------------
helm
auto-completion
better-defaults
emacs-lisp
git
github
;; org
shell
;; (shell :variables
;; shell-default-height 30
;; shell-default-position 'bottom)
;; spell-checking
;; version-control
;; my custom layers
syntax-checking
java
;; django-web-mode for Selmer templates:
django
;; for integration with Dash documentation tool:
dash
;; nice REST client - see
restclient
;; ranger layer - alternative to dired mode
ranger
)
#2017-11-2212:05sam16removed that line#2017-11-2212:05sam16even my dumb auto-complete aint working nw#2017-11-2212:05sam16now*#2017-11-2212:05sam16thanx for your time i will comback if solved the issue#2017-11-2212:06jumaromg. sorry, than the last tip I can give you is to try fresh spacemacs installation and add only the auto-completion layer and see how this works.#2017-11-2212:07sam16ya that will be the last resort only#2017-11-2212:07sam16thank you for your time i will keep looking for the solution#2017-11-2212:12sam16to add clojure mode you jsut add it to your layers right and restart right?#2017-11-2212:12sam16just last thing can you share a screenshot of you minor modes when you are in clojure file#2017-11-2212:12sam16like i have shared#2017-11-2212:12sam16this is what i have#2017-11-2212:13sam16plz check the group cant attach in thread#2017-11-2212:16jumarcan't see much there.
btw. I'm not even sure if auto-completion is required for the thing you want. I remember I had to install it to get proper expansion on TAB#2017-11-2212:19sam16o.O#2017-11-2212:19sam16Oooh idk#2017-11-2212:20sam16i have read that its necesary to have auto-complete for completion in clojure#2017-11-2212:14sam16@jumar here you go#2017-11-2215:22vuuvi@eggsyntax and @chris hereās a nice gist with a bunch of keybindings: https://gist.github.com/robphoenix/9e4db767ab5c912fb558#2017-11-2215:50practicalli-johnny@sam16 you can start a clojure repl from within Spacemacs using clojure-jack-in or clojurescript repl using clojurescript-jack-in (this starts both a clojure & clojurescript repl). You should only need the clojure layer for this to work, no hooks required. Adding the autocomplete layer will automatically give you autocomplete (usually need to restart emacs after adding this layer)
My .spacemacs configuration is at: https://gist.github.com/jr0cket/53cb480eba71fa9867adeb8db712393c
Also, create a simple project to test your Spacemacs setup, eg. lein new figwheel hello-world.#2017-11-2219:37vuuvianyone know how I can redefine the home and end keys?#2017-11-2219:38vuuviI keep accidently hitting them and having them take me to the end of a file. Itās very frustrating#2017-11-2219:45chris(unbind-key (kbd "<home>"))#2017-11-2219:46chris(unbind-key (kbd "<end>"))#2017-11-2220:05vuuvithanks! @chris#2017-11-2306:04sam16@jumar and @jr0cket thanks for your help.
I finally was able to get to the roots of the issue and solve it.
I was able to get auto-complete when i did cider-jack-in but i wasnt able to get it when i did cider connect thats when i figured that there will be some issue with my cider config.
hence i revisited spacemacs clojure layer
https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/clojure
and figured out i hadn't created global profiles.clj as stated there which enables clj-refactor and clj-repl functionalities globally.
Once i created the profiles.clj in ~/.lein i was able to get it in cider-connect also. Yay
Thanx for your help#2017-11-2307:20jumarI actually removed cider-nrepl and refactor-nrepl from my profiles.clj and rely on cider to inject the proper versions. True that I don't get autocomplete when I connect to the external nrepl but I almost never do that.
Good to hear that you solved it finally.#2017-11-2309:23sam16ya. maybe you can keep it too#2017-11-2321:13practicalli-johnnyIf you really need to keep on using cider-connect over cider-jack-in then remember you need to keep the versions of cider-nrepl, refactor-nrepl & tools.nrepl up to date with updates of clojure-mode in spacemacs#2017-11-2416:19sam16Ya i will make it a point thank you @jr0cket#2017-11-2718:35vuuviout of interest, how do you guys save your files? What key command do you use? I am still using C-x C-s since that was more or less the first emacs command I ever learned#2017-11-2718:36rustam.gilaztdinovspc f s ?)#2017-11-2718:59ag- you can use that, you can also use ex-command :w like in Vim,
- there's also SPC f S to save ALL open buffers.
- in OS X you can also do Cmd+s - I think you need "osx" layer added for that#2017-11-2721:25vuuviI didnāt know there was an osx layer.#2017-11-2810:32shan:w for me#2017-11-2815:21vuuviinterestingā¦..#2017-11-2816:14scknkkrerHi guys. I just wanna create a package and assing a binding to that function.
Any tutorial or document ?#2017-11-2816:30vuuvi@scknkkrer checkout this guide: it does a pretty good job of explaining all of spacemacs configuring#2017-11-2816:30vuuvihttp://thume.ca/howto/2015/03/07/configuring-spacemacs-a-tutorial/#2017-11-2816:31scknkkrerHow can I fetch a package from github ?
I couldnāt find any example. #2017-11-2816:32vuuvicheck this snippet out: dotspacemacs-additional-packages
'(
(mypackage :location (recipe :fetcher github :repo "githubuser/mypackage"))
)
#2017-11-2816:32vuuvipart of this FAQ https://github.com/mbertheau/spacemacs-faq/wiki#how-do-i-install-an-emacs-package-from-github#2017-11-2816:38scknkkrerI did that. But my package doesnāt load. How can I debug the problem ?#2017-11-2816:39eggsyntax@scknkkrer I would check the *messages* buffer first to see if it reports an error when it tries to load it.#2017-11-2816:40eggsyntax(Probably at SM startup time)#2017-11-2816:49vuuvigotta love those SM startup time error messages#2017-11-2817:15scknkkrerWait, it install my package from source.#2017-11-2817:16scknkkrerBut it doesnāt load the functioncs inside it.#2017-11-2817:16eggsyntaxAh, you probably need to add (require 'my-package) to your user-config.#2017-11-2817:16eggsyntaxIIRC#2017-11-2817:17scknkkrerBut, use-package function donāt that for me ?#2017-11-2817:21eggsyntaxOh. I would expect it to, on the face of it. Not sure I've actually used use-package, it just sounds like it would š#2017-11-2817:22scknkkrerSo, it will live ? š#2017-11-2817:22chrisyeah, it won't autorequire things#2017-11-2817:22christhat would defeat the purpose of spacemacs' lazy loading#2017-11-2817:23chriswell, it won't unless the package config tells it to#2017-11-2817:24scknkkrerChris, here is the thing. I started development on spacemacs yesterday. I read a lot. But every documentation shows the things from far away. so tiny perspective.#2017-11-2817:26scknkkrer(defconst exercism-layer-packages
'(evil-magit (exercism-mode :location (recipe :fetcher github
:repo "LeaveNhA/exercism-mode"))))
(defun exercism-layer/post-init-evil-magit ()
(with-eval-after-load 'magit
(require 'evil-magit)
(evil-define-key 'motion magit-mode-map
(kbd dotspacemacs-leader-key) spacemacs-default-map)))
(defun exercism-layer/init-exercism-mode ()
(use-package exercism-mode
:defer t))
(defun exercism-layer/post-init-exercism-mode ()
(progn
(spacemacs/declare-prefix "E" "Exercism")
(spacemacs/declare-prefix "Ex" "Exercise")
(spacemacs/set-leader-keys
"Exf" 'exercism-mode/fetch-new-exercise
"Exs" 'exercism-mode/send-solution-to-exercism)))
#2017-11-2817:27scknkkrerI need magit but not as owner layer. so I do my init in post-init stage.#2017-11-2817:27scknkkrerI add my mode package from github.#2017-11-2817:27scknkkrerIt really install my package from there.#2017-11-2817:28scknkkrerBut when I donāt define the package functions in my layer. It says invalid commandpā¦ā¦. I think it really donāt load my mode properly.#2017-11-2817:31eggsyntax@scknkkrer you might want to consider bringing it up in the Spacemacs gitter -- that seems to be where a lot of the SM devs hang out. https://gitter.im/syl20bnr/spacemacs#2017-11-2817:31scknkkrerI did. They laugh at me.#2017-11-2817:32eggsyntaxSorry to hear that.#2017-11-2817:32scknkkrerāCommunity-Drivenā#2017-11-2817:33scknkkrerSays on my sapcemacs.#2017-11-2817:34scknkkrerIronicā¦#2017-11-2817:39scknkkrer@eggsyntax also, when I require the package, it says; Required feature was not provided#2017-11-2817:40eggsyntaxDefinitely way outside my expertise; I've never tried to do anything at all complicated with packages. I mostly stick with existing layers.#2017-11-2819:39scknkkrerhttps://github.com/LeaveNhA/exercism-layer#2017-11-2819:40scknkkrerI just did.#2017-11-2819:40scknkkrerIf anyone who use http://exercism.io for exercise in spacemacs.#2017-11-2819:40scknkkrerYou can use this.#2017-11-2819:57jeff.terrellNice work @scknkkrer! Just curious, have you opened a PR to add the layer to core spacemacs? That'd be neat to see. simple_smile#2017-11-2819:57jeff.terrellDid you get all your problems straightened out?#2017-11-2820:01scknkkrerNot yet. Itās too empty right now. I have to implement another features.#2017-11-2820:01scknkkrerI am glad you like it.#2017-11-2820:24vuuvi@eggsyntax I am with you on that!#2017-11-2820:25vuuvioh what a cool idea @scknkkrer!#2017-11-2820:29ag@scknkkrer I believe you need layers.el in your dir. where you declare layers that your layer depends upon#2017-11-2820:29agin that file you'd add something like (configuration-layer/declare-layers '(git))#2017-11-2820:30scknkkrerI didnāt use any external layer.#2017-11-2820:31agwell, you need magit, magit is already comes with git layer, if you want layers to load in order I think you need to do that#2017-11-2820:32scknkkrerOpps. wait a minute. š#2017-11-2820:33scknkkrerI removed it.#2017-11-2820:33scknkkrerThanks for the inform.#2017-11-3016:37vuuvidoes anyone have a guide for paredit mode in spacemacs?#2017-11-3016:42eggsyntax@alexkeyes unless I'm mixing myself up again, it's the evil-cleverparens layer; documentation at https://github.com/luxbock/evil-cleverparens#2017-11-3016:42vuuviokay cool Iāll check that out thanks!#2017-11-3016:44eggsyntaxOr...maybe smartparens. I'm never going to get this straight š#2017-11-3016:44eggsyntaxhttps://github.com/Fuco1/smartparens#2017-11-3016:44eggsyntaxIf I do help-describe-mode, smartparens is the one that's listed as being turned on.#2017-11-3016:45chrissmartparens and cleverparens are subtly different, unhelpfully#2017-11-3016:45chriscleverparens is a helper for smartparens that's opinionated#2017-11-3016:45chrisif you want regular smartparens to have evil integration there is evil-smartparens iirc#2017-11-3016:46chrismostly it just builds in some nice to haves#2017-11-3016:46eggsyntaxThanks @chris. I shouldn't have even tried to answer, since apparently I'm neither clever nor smart enough to keep them straight š#2017-11-3016:46chrislol#2017-11-3016:47vuuvi@eggsyntax with the zingers#2017-11-3016:47vuuviš#2017-11-3016:58vuuviis it janky just to use lisp mode to control my lisp expressions? thatās been the way Iāve been doing it and I havenāt shaken the feeling there might be something better I just donāt know what it is yet#2017-11-3018:00eggsyntax@alexkeyes you mean like all the SPC k stuff? That's definitely what I do. For me, at least, lisp-mode goes hand-in-hand with smart/clever-par-en/edit.#2017-11-3018:01eggsyntaxIn fact, notice that most of the SPC k commands are sp-whatever -- I assume sp is for smartparens. ie lisp-mode is just an interface to smartparens.#2017-11-3018:01eggsyntaxOr so I speculate.#2017-11-3019:42vuuviyeah thatās exactly what Iām talking about#2017-11-3019:43vuuviand yeah I made that connection about an hour ago haha#2017-12-0115:04jeff.terrellI had somebody email me describing some pain around using windows and buffers. He was asking for tips, so I wrote some. I thought I'd share them here in case they're useful to anybody else.
> 1. SPC w u for winner-undo, which undoes the last change to windows.
> 2. SPC TAB to go to the previous buffer visited by a window.
> 3. Using layouts. It took me a while to learn how to do this effectively, but I currently have a separate layout e.g. for viewing my org-mode files and agenda. I visit that layout to plan my day (and revisit it occasionally during the day), which I can do and then go back to the previous layout when I'm done, which saves the window arrangement I had before I switched to that layout. One potentially confusing thing: when you're in any non-default layout, not all buffers are available in that layout. You have to add them to the layout explicitly, with SPC l a I think.
> 4. SPC 1 through SPC <n> to switch to a window by number. I usually have windows arranged strictly as columns (i.e. without multiple windows in a single column), which helps this be more useful.
> 5. SPC w TAB to switch to the previous window.
> 6. SPC t g to toggle golden ratio mode, which I find to be nice when I'm on my laptop screen but not when I'm on a bigger monitor. Sometimes things get a bit wonky in Spacemacs when toggling golden ratio on and off, which I've found I can fix by e.g. switching to the left-most window with SPC 1 then moving it to the left-most position (which you'd expect to be a no-op) with SPC w H.
>
> Also, I'll mention that, coming from vim, it took me a while to get used to editing without tabs, which I used a lot in vim. I briefly explored tab packages in emacs but didn't find anything I liked. I still use tabs when I use vim on the command line, but I've gotten pretty comfortable with spacemacs' way of doing this, like the things I mention above as well as SPC b b for fuzzy-finding a buffer by name.#2017-12-0115:19jeff.terrellI decided to also share this with the Spacemacs subreddit so the content would endure beyond ~4 days. simple_smile Here's a link:
https://www.reddit.com/r/spacemacs/comments/7gvlz6/tips_for_managing_buffers_and_windows_in_spacemacs/
Interestingly, r/Clojure is listed as one of 5 subreddits related to r/Spacemacs. :thinking_face:#2017-12-0115:33vuuvi@jeff.terrell Thanks for the tips! I didnāt know about golden ratio mode#2017-12-0115:34vuuvialso itās worth mentioning the windmove package. Navigating windows via Shift - Arrow Key#2017-12-0115:39jeff.terrell@alexkeyes - You're welcome! And I'll have to check that out. Feel free to add a comment to the post in Reddit if you like.#2017-12-0116:32bfayThe default way to eval a clojure form with cider is to move the cursor past the closing paren of the form and hit , e e. I find that kind of annoying, because with vim bindings the cursor can only move to the last character of a line, not the character after it.
I dunno if anybody else would find this useful, but I added a binding for ";" that lets me execute the form by putting my cursor on the first character of the form (the open paren).
I did this by adding these two lines to my dotspacemacs/user-config
(evil-define-key 'normal clojurescript-mode-map ";" 'cider-eval-sexp-at-point)
(evil-define-key 'normal clojure-mode-map ";" 'cider-eval-sexp-at-point)
#2017-12-0116:34bfayThis is super useful in conjunction with another shortcut I defined for avy-goto-char.
If I want to move my cursor really quickly to an open-paren, I just have to type g (, and type in the characters that appear on top of that paren.
(define-key evil-normal-state-map "g(" (defun go-to-paren () (interactive) (avy-goto-char ?\()))
(define-key evil-normal-state-map "g[" (defun go-to-bracket () (interactive) (avy-goto-char ?\[)))
(define-key evil-normal-state-map "g{" (defun go-to-curly () (interactive) (avy-goto-char ?\{)))
(define-key evil-normal-state-map "g\"" (defun go-to-double () (interactive) (avy-goto-char ?\")))
(define-key evil-normal-state-map "g\'" (defun go-to-single () (interactive) (avy-goto-char ?\')))
#2017-12-0116:34eggsyntaxYou can also do this, @bfay, in order to have an eval operator that works the same way that eg d does:
;; Define an "eval" operator
(evil-define-operator generic-evil-eval-operator (beg end)
(cider-eval-region beg end))
(define-key evil-normal-state-map (kbd (left-mod "e")) 'generic-evil-eval-operator)
#2017-12-0116:35eggsyntax(Except the left-mod thing is just something of mine, you'd want something like "A-e" or whatever)#2017-12-0116:35bfayOh that's really cool, you're eval'ing the region that you encounter from your vim motion?#2017-12-0116:36eggsyntaxYep. It's been a bit inconsistent for me, it sometimes has off-by-one errors where you only select up to the closing paren instead of up-to-and-including. But mostly it works pretty well š#2017-12-0116:37bfayThanks for the tip!#2017-12-0118:23reefersleepAnyone here have success integrating re-jump.el with spacemacs? https://github.com/oliyh/re-jump.el#2017-12-0118:23reefersleepusing spacemacs has left me an emacs newb, so I donāt know what to do with .el files, and I donāt know how to remap to something evily#2017-12-0121:10jeff.terrell@reefersleep - I'm no expert on such things, but I think what I'd try is, in my dotspacemacs/user-config in ~/.spacemacs, adding that code to whatever appropriate hook that I could find in clojure-mode or cider-mode. Let me know if that's not enough to go onā¦#2017-12-0518:43reefersleepThanks @jeff.terrell š Itās not quite enough for my level of elisp-competence (near nil). Iām afraid of polluting my ~/.spacemacs with hacky junk, so Iād like to be more sure about what to do#2017-12-0518:45reefersleepIs it something like
(with-eval-after-load 'cider
(defun re-frame-jump-to-reg ()
(interactive)
(let* ((kw (cider-symbol-at-point 'look-back))
(ns-qualifier (and
(string-match "^:+\\(.+\\)/.+$" kw)
(match-string 1 kw)))
(kw-ns (if ns-qualifier
(cider-resolve-alias (cider-current-ns) ns-qualifier)
(cider-current-ns)))
(target-file (concat (clojure-project-dir) (cider-sync-request:ns-path kw-ns)))
(kw-to-find (concat "::" (replace-regexp-in-string "^:+\\(.+/\\)?" "" kw)))
(buffer (cider--find-buffer-for-file target-file)))
(when (and ns-qualifier (string= kw-ns (cider-current-ns)))
(error "Could not resolve alias \"%s\" in %s" ns-qualifier (cider-current-ns)))
(if buffer
(progn (cider-jump-to buffer)
(search-forward-regexp (concat "reg-[a-zA-Z-]*[ \\\n]+" kw-to-find) nil 'noerror))
(error "Could not open a buffer for %s" target-file))))
(global-set-key (kbd "M->") 're-frame-jump-to-reg))
#2017-12-0518:48reefersleepMaybe with something like (evil-define-key 'normal clojurescript-mode-map "G" 'reframe-jump-to-reg) (obviously with a different key. Should really be a SPC something something binding)#2017-12-0520:41jeff.terrellWithout actually trying it myself, that looks very plausible to me. š If you try it and have problems feel free to shout out.#2017-12-0619:08reefersleepCheers š#2017-12-0420:49vuuviI have a colleague who canāt get a cider repl to start - she keeps getting the error Could not transfer artifact refactor-nrepl
ā¦. any idea how to fix this? never seen it before#2017-12-0500:46agprobably some middleware didn't load.#2017-12-0500:47agare you trying to cider-connect?#2017-12-0516:52vuuviso this got solved ā she loaded the application through the terminal so that it used the bash settings and automagically it loaded correctly.#2017-12-0518:07agAFAIK in order for Emacs to read the env vars correctly there is a couple of things required:
- exec-path-from-shell should be added (Spacemacs includes it)
- the vars need to be listed in exec-path-from-shell-variables var. By default it only includes "PATH" and "MANPATH"#2017-12-0518:08agso your colleague probably has something related to LEIN/BOOT as the env var#2017-12-0518:20vuuviyeah Itās working now thanks for the advice tho @U0G75ARHC#2017-12-0501:16PBAnyone having issues with spacemacs throwing this error
Debugger entered--Lisp error: (file-error "Cannot open load file" "No such file or directory" "up-core")
require(up-core)
eval-buffer(#<buffer *load*-21701> nil "/Users/me/.emacs.d/elpa/use-package-20171203.1313/use-package.el" nil t) ; Reading at buffer position 1691
load-with-code-conversion("/Users/me/.emacs.d/elpa/use-package-20171203.1313/use-package.el" "/Users/me/.emacs.d/elpa/use-package-20171203.1313/use-package.el" nil t)
require(use-package)
spacemacs-bootstrap/init-use-package()
This is a fresh clone of spacemacs with a newly generated .spacemacs file#2017-12-0501:28aguse-package is broken. use melpa-stable. the easiest way is to switch to develop branch of spacemacs and set dotspacemap-use-spacelpa to t#2017-12-0502:31PBAh thank you!#2017-12-0502:31PBIāll give it a shot in a minute#2017-12-0514:28paulspencerwilliamsI'm using Spacemacs and have a working .eslintrc on a sample React App. When I invoke checking on a .js file, I expect it to list the issues present, but instead, it suggests that javascript-eslint is disabled, although enable-able:
Syntax checkers for buffer App.js in react-mode:
javascript-eslint (disabled)
- may enable: yes
- executable: Found at /Users/will/src/learning/eslint-with-react/node_modules/.bin/eslint
- config file: found
. I'm obviously being stupid, what am I missing? I've read the flycheck documentation but can't get my head around this configuration.#2017-12-0516:53vuuviso have you done a fly-check enable
to get it to work again?#2017-12-0520:10vuuvieverytime I delete something using the d command, hitting p will undo my delete command instead of pasting what I copied from my OS#2017-12-0520:15chrisyeah, unfortunately#2017-12-0520:15christhis is solved in vim by using registers besides the unnamed register#2017-12-0520:16chrisI believe evil has these built in, but I'm not exactly sure how to make sure your clip register and kill register aren't the same#2017-12-0520:16chrisa work around is to kill into registers that aren't the default one#2017-12-0520:17chrisso "adip which kills the paragraph into the a register#2017-12-0520:17eggsyntax@alexkeyes in other words, it is pasting what's at the top of your kill ring -- which is the thing you just deleted.#2017-12-0520:19vuuvithat makes sense#2017-12-0520:19vuuviis there any way to learn more about registers that isnāt just trial and error?#2017-12-0520:20eggsyntaxYou could also cycle through your kill ring to get to the previous thing (after you p). I forget the default binding for that, but each time you hit it it'll switch the pasted text to the next earliest thing.#2017-12-0520:21eggsyntaxThis looks decent: https://emacs-fu.blogspot.com/2009/01/using-registers.html#2017-12-0520:21eggsyntaxTons more online about various solutions to your particular issue too.#2017-12-0520:22eggsyntaxeg https://www.reddit.com/r/emacs/comments/58lf3o/in_evil_mode_how_can_i_prevent_adding_to_the_kill/#2017-12-0520:22eggsyntaxLooks like C-p is the default binding for cycling through kill ring.#2017-12-0520:23eggsyntaxPersonally I rely less on the kill ring than on an OS-level register-history app -- CopyClip on Mac, CopyQ on Linux.#2017-12-0520:24eggsyntaxBut I def turn to the kill ring when I need it#2017-12-0520:29PB@ag thank you for your help last night, it worked!#2017-12-0520:33vuuvithanks for the info @eggsyntax!#2017-12-0612:08naomariki think i asked this before but didnāt have time to investigate: does anyone have smartparens working with yasnippet? i tend to use defn and let expansions frequently and itās frustrating having no smart parens when i do this. i found this https://github.com/syl20bnr/spacemacs/pull/1644 so it looks like it was intentionally disabled#2017-12-0612:24naomarikjust looking into this more, seems there is no solution for using hippie-expand. is there a different way to accomplish same task of inserting code snippets while maintaining smartparens?#2017-12-0613:50jeff.terrell@naomarik - I haven't gotten into yasnippet so I can't help with that. But I've been starting to get into clj-refactor, which might do some of the same things. For example: introduce a let binding: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-introduce-let#2017-12-0614:17naomarikahh yess, know about that, but this doesnāt really help when i know i need a let before writing things#2017-12-0702:44michaellindonmy repl in spacemacs is rather slow and laggy, is this a common observation? This particularly happens when the repl has printed some large output. Is there a way to speed this up like turn off autocompletion for the repl?#2017-12-0703:04agwhich repl are you talking about?#2017-12-0710:59shanI find that happens too. Usually I just do cider-repl-clear-buffer (`SPC m s c`) but that doesnāt really help if you want to keep the output#2017-12-0714:19practicalli-johnnyYou can limit the output in the REPL to x many lines (sorry, on a slow network, so havent googled it)#2017-12-0715:14michaellindoni think both of these are useful suggestions, thanks#2017-12-0715:54vuuvithere was also a similar thread further up in the chat about this problem FWIW#2017-12-0710:17mccraigmccraigassuming you are talking about a clj or cljs repl @michaellindon - if you find something i would love to know about it too š¬#2017-12-0714:15practicalli-johnny@petr @eggsyntax there is a paste-transient-state in the develop branch of Spacemacs that allows you to traverse the kill ring. This was poping up a little menu when ever you pasted, allowing you to navigate through the kill ring with p and P#2017-12-0714:18practicalli-johnny@naomarik I do use yasnippets, but then I tend to tab out to the end $0 before doing anything that benefits from smartparens. I have a couple of posts on how I use it, although they don't address this specific issue directly http://jr0cket.co.uk/tags/yasnippets/#2017-12-0714:20eggsyntax@michaellindon there are loads of things that you can try that might speed it up, but the best strategy is usually to start with the emacs profiler. It's surprisingly easy to use, and can often let you quickly narrow down to the thing that's causing the problem.
Pretty much all the info you need is on this short page: https://www.gnu.org/software/emacs/manual/html_node/elisp/Profiling.html#2017-12-0714:35jeff.terrellAlso, I suppose you might get help on #cider @michaellindon.#2017-12-0715:05michaellindonThanks for all the suggestions, I'm experimenting a few things this morning#2017-12-0715:06michaellindonSo far, turning off company mode for the repl (clojure) has helped in addition to @shan's suggestion of clearing the buffer with (SPC m s c), things typically slow down when there is a lot of output for me#2017-12-0715:07michaellindonfor example, if you generate 10000 random uniforms and the repl prints them out, entering commands and getting output becomes a lot slower after that#2017-12-0715:09michaellindonI generated an even larger number and I never got the prompt back to enter the next input. I cleared the buffer, the prompt came back immediately#2017-12-0715:11michaellindonI found this issue: https://github.com/clojure-emacs/cider/issues/228#2017-12-0716:56eggsyntax@michaellindon quick & dirty way to catch whatever it is when that happens:
M-x toggle-debug-on-quit
Then repro the issue so you don't have the prompt, hit C-g to interrupt, and boom, you'll get the call stack for what's happening at the point you interrupt.
https://emacs.stackexchange.com/a/4024#2017-12-0718:18michaellindonAwesome, thanks :)#2017-12-0723:36naomarik@jr0cket yeah looks like some incompatibility between smartparens and yasnippet. i forced enabled it and it throws in extraneous characters when you expand a snippet in some cases.#2017-12-1116:06clojerI have SBCL installed and running but after adding common-lisp to my .spacemacs I canāt get a connection inside Spacemacs.#2017-12-1116:07clojerMy Helm bar shows āLisp /cdn-cgi/l/email-protectionā so Slime is loaded.#2017-12-1116:55vuuvi@clojer sorry I donāt know that much about SBCL - Iād suggest checking out the spacemacs glitter channel?#2017-12-1116:55vuuviand I just got exposed to the magit log mode, wow itās awesome do you guys use it here?#2017-12-1116:57jeff.terrellLike when you hit l l in a magit status buffer? Oh yes, I use that all the time. simple_smile#2017-12-1116:58vuuvido you know if thereās a keybinding for avoiding having to open the status buffer?#2017-12-1117:00jeff.terrellI did a describe key, poked around the source a bit, and it looks like M-x magit-log-current will do what you want.#2017-12-1117:04vuuvioh thatās a good idea#2017-12-1116:55clojerFixed. I had a file open in Spacemacs while attempting to start the REPL.#2017-12-1116:56vuuvioh thatās a funny problem.#2017-12-1121:40grzmI'm trying out Spacemacs and smartparens (coming from bare-bones Emacs and paredit). I'm a bit surprised by the behavior of sp-forward-slurp-sexp. (foo [|] bar) => (foo [ |bar]) (| is point) Is there a way to get it to close up that space before bar?#2017-12-1121:43eggsyntaxNo easy way that I'm aware of, short of writing a custom fn and changing your keybinding to point at that.#2017-12-1121:45grzmIs this something you've encountered? If so, do you just type backspace and move on?#2017-12-1121:46eggsyntaxYep. Doesn't bother me that much. Someone else may have a solution, though.#2017-12-1121:48grzmThanks for confirming.#2017-12-1121:50eggsyntaxI definitely get identical behavior on the same case.#2017-12-1121:50eggsyntaxMakes me think it would be really nice to have a generalized "tighten up extra spaces" fn...#2017-12-1121:54grzmThat's the stock behavior in paredit#2017-12-1122:40aginterestingly in emacs-lisp it does the right thing#2017-12-1122:43grzmOh? I see the same behavior: (foo bar (|) baz) => (foo bar (| baz))#2017-12-1122:44agoh wait... hmm... strange. I didn't see it the first time...#2017-12-1122:44aglet me try again#2017-12-1122:45agoh shoot, yeah you're right... sorry I thought it worked for me first time#2017-12-1122:54agokay... it seems paredit-forward-slurp-sexp does the right thing, and sp-forward-slurp-sexp leaves the space#2017-12-1122:57agwhat do you use to slurp? Do you use SPC k s? or some other key?#2017-12-1122:58agyou basically can redefine that key for lispy to use paredit-forward-slurp-sexp instead of default one.#2017-12-1122:59ag- first you need to wrap the function, make it "lispy", so you can continuously keep slurping, e.g. SPC k s, s, s... etc.#2017-12-1122:59ag(evil-lisp-state-enter-command paredit-forward-slurp-sexp)#2017-12-1123:00agthat macro would create a function named evil-lisp-state-paredit-forward-slurp-sexp#2017-12-1123:01ag- then you just bind/re-bind the key:
(spacemacs/set-leader-keys "ks" 'evil-lisp-state-paredit-forward-slurp-sexp)#2017-12-1123:01ag@grzm āļø#2017-12-1123:08grzm@ag thanks for digging into this. When I'm using smartparens, I'm using sp-forward-slurp-sexp. I figure if I'm going to use smartparens, I should be using the smartparens commands: having two packages that do pretty much the same thing seems a step backwards to me. AFAIK, I'm not using any of the evil-mode stuff. Though, at this point (maybe it's too early to call? been trying for a week or so) I'm not sure what smartparens gives me over paredit. I like the fact that it's actually maintained, and I hear it's much more configurable, but the teething period is getting to me.#2017-12-1323:05vuuvihey guys is there a way to recover a local history? I accidentally closed a file with :q and I reallllyyy would rather not retype it all out#2017-12-1323:08jeff.terrell@alexkeyes - Does winner-undo (`SPC w u`) work? If not, can you find the buffer in your buffer list (`SPC b b`)?#2017-12-1323:08vuuviyeah that worked thanks @jeff.terrell!#2017-12-1405:04justinleeHi all. I'm new to clojure and spacemacs. I was trying to connect to an nREPL server that I created using boot-cljs-repl. I'm getting a NPE that seems to be coming weasel and boot_cljs_repl in the main cider-repl buffer. I am also getting a LispReader ReaderException in the cider-error buffer. I'm thinking that the NPE is actually coming from the server and the reader error is coming from cider, but it is awfully hard to tell what's going on here. Any ideas of how to debug?#2017-12-1405:08justinleeI should add that the NPE throws after I run (start-repl)#2017-12-1412:40practicalli-johnnyHello @lee.justin.m welcome to Clojure & Spacemacs. Sorry, I mostly use Leiningen build tool for my Clojure projects, although boot is on the todo list. If you have Leiningen, you could create a simple project with lein new myproject and use cider-jack-in command in Spacemacs to test you Clojure layer in Spacemacs is working.#2017-12-1412:46practicalli-johnny@lee.justin.m the basic steps for starting a boot project, or connecting to a boot project started on the command line are covered in https://cider.readthedocs.io/en/latest/up_and_running/#2017-12-1416:46vuuviis there a way to reverse search in the cider repl?#2017-12-1416:47vuuvithe same as a ctl-r in the terminal?#2017-12-1416:53chrisM-r maybe?#2017-12-1416:53chrisIt seems like it does a reverse regex search and pastes the results in the buffer#2017-12-1416:53chrisbound to cider-repl-previous-matching-input#2017-12-1416:54vuuviokay Iāll give it a go#2017-12-1416:55chrisit doesn't work quite as well because it doesn't really cycle as far as I can tell#2017-12-1418:36vuuviyeah it wasnāt working very well for me#2017-12-1418:44justinleeThanks @jr0cket. I tried going down that path but now I think I'm hopelessly confused. Although I can run lein repl and then get cider to connect to that, what I was trying to do was to work through the modern-cljs tutorial to get a repl to connect to the browser. In both the boot and lein versions of the tutorial, I can get to a point where I can type (js/alert "hi") and get a popup in the browser using the terminal-based nrepl clients. But I can never figure out what to do to get cider to do that. I think there is some kind of proxying going on but I just can't figure out what. I think I should just use the terminal-based repl for now. Cut-n-paste isn't that hard. š#2017-12-1418:48chrisgetting cljs repls in cider has always been kinda touch and go#2017-12-1418:49chrisI was able to get it to work in both lein and boot, but it took a lot of finagling, and I don't even think what I have would work for a different environment#2017-12-1418:49chrisI would just stick with terminal repl for a bit#2017-12-1418:49chrisclojure repls have always been rock solid with cider#2017-12-1418:53justinleecoming back to lisp after so many years away makes me remember how glorious and infuriating it is š#2017-12-1421:26justinleefor the record, I got it working but the problem had nothing to do with spacemacs or cider#2017-12-1421:38vuuvithatās good to hear!#2017-12-1501:19practicalli-johnny@lee.justin.m I use a user.clj namespace to start a ClojureScript REPL from CIDER https://practicalli.github.io/clojurescript/reagent-projects/tic-tac-toe/figwheel-helper-functions.html#2017-12-1501:23practicalli-johnnyThis user.clj namespace comes from the lein-figwheel template and gives an easy way to run CLJS projects from Emacs. I set cider-cljs-lein-repl in the dotspacemacs/user-config section of .spacemacs file to make clojurescript-jack-in run the correct commands. The user.clj namespace is the default dev namespace when a clojure repl runs.#2017-12-1501:24practicalli-johnny(setq cider-cljs-lein-repl
"(do
(user/fig-start)
(user/cljs-repl))")#2017-12-1501:36justinleeThanks @jr0cket. Iāll take a look. I eventually got it to work by adding some weasel code to my main code, adding some middleware, and then pasting some magical invocation from the weasel GitHub page into the cider repl.#2017-12-1501:42practicalli-johnnyWas that for boot? Curious to know what you got working as when I tried modern-cljs previously I never got anything to work#2017-12-1501:43practicalli-johnnythat was a while ago though#2017-12-1503:33justinleeYes it was for boot. The steps were to (1) require weasel and call repl/connect in the main application code, (2) use the cljs-repl target in boot, (3) in cider (require 'weasel.repl.websocket) and then issue this magic: (cemerick.piggieback/cljs-repl
(weasel.repl.websocket/repl-env :ip "0.0.0.0" :port 9001))#2017-12-1514:58vuuvihow long has everyone here been using spacemacs?#2017-12-1515:11jeff.terrell2ā3 years, somewhere in there. Hard to believe it's been that longā¦Spacemacs still feels like a fun new toy to me.#2017-12-1515:15vuuviI think Iām around there as well, Iāve only recently really started digging into the meat of spacemacs and focusing on learning as much as I can#2017-12-1515:16chrisI think february of 2016? so almost 2 years now I think#2017-12-1515:22alandiperti have been souring on it the past couple months... it has crashed on me a couple times and my confidence in emacs was really shaken#2017-12-1515:23alandipertalthough i'm not sure if the problem is emacs, spacemacs, or something in my configuration#2017-12-1515:27vuuvitbh @alandipert itās probably some bitchy mix of all 3 hahaha#2017-12-1515:31chrisI would probably leave it if something better came along#2017-12-1515:31chrisunfortunately I don't really see that happening#2017-12-1515:36alandiperti have a theory that it might be better for my editor to be much simpler, and for me to lean more on the shell for my workflow#2017-12-1515:37alandipertto see, ive been using this editor vis as much as possible https://github.com/martanne/vis#2017-12-1515:39vuuvioh interesting#2017-12-1516:06jeff.terrellLooks pretty interesting, @alandipert! While I still love Spacemacs, I can understand the desire for something simpler and cleaner (and legacy-free). Would you say you've made the switch over to vis, or are you still evaluating it?#2017-12-1516:08alandiperti've switched to it in the areas i still used vim, like as EDITOR. and i have tried to use it at work for node.js dev with mixed results#2017-12-1516:09alandipertin the near future i'd like to write something like inferior-lisp for it. then i can use it for my lisp dev#2017-12-1516:10alandipertalthough, i'm thinking a simpler approach would be, start a lisp reading from a fifo, and then make a vis shortcut that pastes to the fifo and i see the result in an adjacent tmux pane#2017-12-1516:10alandipertmanaging processes is one of the many things that emacs does that seems out of the purview of an editor, perhas#2017-12-1516:10alandipert*perhaps#2017-12-1516:11jeff.terrellSounds cool. I'd be interested to hear how it all goes for you. Do you post about such explorations somewhere?#2017-12-1516:22vuuviIāve also found that I when I try to get the bare bones tooling, thereās a lot of times where I really miss a nice gui or a better visualization of the information I am trying to access.#2017-12-1516:23vuuvifor example, a colleague showed me jetbrainās datagrip recently, and I felt like my using the console to access databases was a completely inferior tool.#2017-12-1516:44alandipertjeff.terrell no but i can continue to post them here since it interests you :-)#2017-12-1516:45jeff.terrellThanks. simple_smile Hmm, how about #editors, since it isn't really about Spacemacs? (I'm there too.)#2017-12-1516:46alandipertoh sure, i didn't know about that one#2017-12-1516:46alandipertalexkeyes i have used and felt that way about datagrip in the past also#2017-12-1516:47vuuvi@jeff.terrell I didnāt know about that either#2017-12-1516:47alandipertbut i feel now like in the long term, anything like that needs to be broken into pieces and customized. like, now if i did SQL i would use it through R and use R to make programmable visualizations#2017-12-1516:53vuuviI see, you wouldnāt just write straight SQL#2017-12-1516:53vuuviwhat about visualizing data?#2017-12-1516:53vuuvilike a SHOW TABLES; query or the like#2017-12-1516:54alandipertoh, well i would write straight SQL... but i would use something that could make graphics to visualize it#2017-12-1516:55alandipertsince looking at pages of counts in a table or result set, its impossible to see trends and outliers#2017-12-1516:55vuuviokay that makes sense#2017-12-1516:56vuuvialso off topic but does anyone know to how to set the python repl to python3?#2017-12-1517:00chrisln -s python3 python#2017-12-1517:00chrisprobably with a -f in there#2017-12-1517:00chris(assuming the python link already exists)#2017-12-1517:02vuuviokay#2017-12-1517:02christhere's also a bunch of pyenv things if you need something less invasive/more project based#2017-12-1517:03chrisvirtualenv/autoenv#2017-12-1517:03vuuviyeah I saw the pyenv mode there#2017-12-1819:27vuuvihas anyone ever run out of virtual memory in the cider repl? Any idea what causes it? What should I do when I run out of memory?#2017-12-2000:58justinleeis it possible to specify a different wrap character (SPC k w)? In clojure I often want to wrap with square brackets, and right now that means inserting a [] pair, deleting the second one, moving to the end of the expression, then adding a ]#2017-12-2011:05andre.stylianosWhy not insert [] and then slurping what you want to be inside, instead of deleting and adding ] to the end#2017-12-2012:59chrisslurping or using evil surround (what I would suggest most of the time)#2017-12-2012:59chrisyou can also just bind a new function#2017-12-2012:59chris(defun lisp-state-wrap (&optional arg)
"Wrap a symbol with parenthesis."
(interactive "P")
(sp-wrap-with-pair "("))
#2017-12-2012:59christhat's the entire function#2017-12-2015:35ag@lee.justin.m
a) if you have an expression (foo) and you want to replace parens with square brakets you can do cs([ - while cursor is on the paren
b) if you just want to surround (foo) with square brackets, you can first select it either by doing v% - while cursor on the paren, or by va(; and then simply do s[, that will surround the expression with square brackets
c) if you just want to insert a single bracket, without causing automatic insertion of the second one - you can always "insert literally" - press C-v (while in insert mode) and then press [ - that will force Emacs to ignore smartparens and simply insert the character#2017-12-2017:14justinlee@U0G75ARHC @U050AFD41 @U485ZRA58 those are all great options. I donāt know why I didnāt think of insert+slurping. Thanks for the help. Lots of great tips that I didnāt know about here.#2017-12-2020:33ScotOthers may find this kinda gross, but I rebind wrap as follows: (define-key evil-lisp-state-map (kbd "w") nil)
(define-key evil-lisp-state-map (kbd "ww") (evil-lisp-state-enter-command evil-lisp-state-wrap))
(define-key evil-lisp-state-map (kbd "wW") (evil-lisp-state-enter-command sp-unwrap-sexp))
(define-key evil-lisp-state-map (kbd "w(") (evil-lisp-state-enter-command evil-cp-wrap-next-round))
(define-key evil-lisp-state-map (kbd "w)") (evil-lisp-state-enter-command evil-cp-wrap-previous-round))
(define-key evil-lisp-state-map (kbd "w[") (evil-lisp-state-enter-command evil-cp-wrap-next-square))
(define-key evil-lisp-state-map (kbd "w]") (evil-lisp-state-enter-command evil-cp-wrap-previous-square))
(define-key evil-lisp-state-map (kbd "w{") (evil-lisp-state-enter-command evil-cp-wrap-next-curly))
(define-key evil-lisp-state-map (kbd "w}") (evil-lisp-state-enter-command evil-cp-wrap-previous-curly))
#2017-12-2020:35Scotsuch that 'w' in lisp state (i.e. SPC k w) is a prefix, and 'w (', 'w {', and 'w [' wrap with their respective parens.
Also evil-cleverparens allows a numeric argument (e.g. "4 SPC k w {" to wrap the next sexps in a pair of braces) which is quite nice for working with nested maps.#2017-12-2015:35ag@lee.justin.m
a) if you have an expression (foo) and you want to replace parens with square brakets you can do cs([ - while cursor is on the paren
b) if you just want to surround (foo) with square brackets, you can first select it either by doing v% - while cursor on the paren, or by va(; and then simply do s[, that will surround the expression with square brackets
c) if you just want to insert a single bracket, without causing automatic insertion of the second one - you can always "insert literally" - press C-v (while in insert mode) and then press [ - that will force Emacs to ignore smartparens and simply insert the character#2017-12-2015:46agI do understand when Vim-style feels daunting to learn, it has many versatile ways to achieve something, even in this simple example I demonstrated a few concepts:
- selecting text from one delimiter to another delimiter v%
- selecting text "in between" - vi(, compare it with va(. These would also work for other delimiters, paragraph p, word w, sentence s, tag t (in HTML)
- literal insertion C-v (while in Insert) mode
- vim-surround: sc, then delimiter that needs to be replaced and char that it should be replaced with
and it may feel you have to think all the time what needs to be pressed to achieve a result, which is only true in the beginning. Once you grasp the concepts, the muscle memory does the rest.#2017-12-2017:21justinleeThe biggest problem I have is just that I havenāt found a comprehensive reference. It seems like all of the documentation is either a cheatsheet or an introduction. Like the vi( and va( commands--most references just seem to talk about visual mode without actually explaining what you can do in visual mode.#2017-12-2019:17eggsyntax@lee.justin.m the vim user manual is actually pretty comprehensive, seems like probably the thing you're looking for.
Manual: http://vimdoc.sourceforge.net/htmldoc/usr_toc.html
Visual mode section (covers the specific questions you're asking): http://vimdoc.sourceforge.net/htmldoc/visual.html
Note that, like everything else in vim and spacemacs, it's customizable -- here's a list of visual-mode operators, but you can add your own operators and text objects: http://vimdoc.sourceforge.net/htmldoc/visual.html#visual-operators
Of course when it gets to customizing stuff like that, that's pretty much the moment where you have to switch from vim documentation to spacemacs documentation (which is also pretty comprehensive).#2017-12-2019:19justinleeThanks. I guess I was looking for spacemacs documentation but I forget that really itās vim underneath and thatās what I should be learning#2017-12-2019:21eggsyntaxYeah, for evil-mode documentation, spacemacs pretty consistently defers to vim docs (although it's worth reading the concepts section of the SM docs to get an overview of the evil-mode implementation and differences from vim (mostly just the evil-surround case)): http://spacemacs.org/doc/DOCUMENTATION.html#concepts#2017-12-2019:29jeff.terrellGood question and great discussion here. I'll only add one nitpick that can save a keystroke. va(s[ can be shortened to ys%[. ys is an operator defined by vim-surround/evil-surround. Give it a motion (`%`) and a character (`[`) and it will surround the delineated text by the character [pair].#2017-12-2623:42agbtw, I've been posting small Spacemacs tips (that can fit into a single tweet) here: https://twitter.com/iLemming
I didn't know I would like this so much, if I knew - I would've created a dedicated twitter account.#2017-12-2701:19jeff.terrellThose are some good tips. Well done, @ag, and thanks for sharing. š#2018-01-0218:34tomayerstHi, new Spacemacs user here. I am working through Living Clojure and am working on the Serpent Talk project in Spacemacs with Cider. When I run the tests from the REPL (SPC -> m -> t -> a) I get āuser-error: Buffer ācider-repl serpent-talkā is not associated with a fileā Could someone tell me what that means? The tests run OK from the talk.clj buffer.#2018-01-0219:27jeff.terrell@tomayerst - It looks like that might be a known bug. When I look at the function documentation (with SPC h d k SPC m t a) I see the following:
, t a runs the command spacemacs/cider-test-run-all-tests, which is an alias for
āspacemacs/cider-test-run-ns-testsā in ā../../../clojure/funcs.elā.
It is bound to M-RET t a, M-m m t a, and many ordinary text characters.
(spacemacs/cider-test-run-all-tests)
ns tests are not actually *all* tests;
cider-test-run-project-tests would be better here, but
there currently is a bug with the function. Replace once
it gets fixed.
#2018-01-0219:27jeff.terrellYou might try calling cider-test-run-project-tests directly, or maybe see if there's a more recent version of cider you could upgrade to.#2018-01-0219:28tomayerst@jeff.terrell Thanks Jeff. A very gentle RTFM! š#2018-01-0219:30tomayerstand thanks for the keys to look at the function docs#2018-01-0219:34jeff.terrellHaha, didn't mean it that way, but glad it helped. simple_smile#2018-01-0221:24vuuviHey guys, this is really off topic, but I just discovered artist mode! Itās really cool. Would anyone be interested in an explanation?#2018-01-0222:21jeff.terrellI have no idea what that is; yep, I would. :raised_hand:#2018-01-0223:07vuuviOh great!#2018-01-0223:08vuuviSo I could do a more formal write up if you guys would like it. Artist mode is meant to be a way to draw in ascii in emacs!#2018-01-0223:08vuuvithe most common usecase I could think of is drawing data flow diagrams things requiring simple boxes and lines.#2018-01-0223:08vuuviHereās the wiki: https://www.emacswiki.org/emacs/ArtistMode#2018-01-0223:10vuuviYou can activate artist mode in any buffer, but Iād recommend opening up a new buffer to experiment#2018-01-0223:10vuuvionce youāve got a new buffer open, start emacs mode and then do a m-x artist-mode#2018-01-0223:11vuuviyou should see the artist major mode activate#2018-01-0223:12vuuvithen in emacs mode, hit c-c c-a to see a list of possible drawing modes.#2018-01-0223:12vuuviOnce youāve selected a ābrushā you can use the mouse or RET and the arrow keys to draw shapes!#2018-01-0223:22vuuviIāve added some gifs and hereās a video describing artist mode in a more UML-y usecase#2018-01-0223:22vuuvihttps://www.youtube.com/watch?v=cIuX87Xo8Fc#2018-01-0301:32jeff.terrellWha-a-at? That's amazing. Those crazy emacs people! simple_smile Thanks for the overview @alexkeyes.#2018-01-0314:36vuuviyouāre welcome @jeff.terrell next time you need to make a UML diagram I hope this is helpful! Thereās apparently a way to make it prettier? I havenāt explored that yet though.#2018-01-0321:22justinleeI have smartparens and rainbow parens enabled. Does anybody know what controls the face of the parenthesis that contain the point? Smartparens controls the matching parenthesis if your point is currently over a paren, but if your point is inside a form, there is something else that will highlight the surrounding parens (which is apparently not rainbow). Any ideas?#2018-01-0321:47romain@lee.justin.m when you say rainbow parens it's rainbow-delimiters?#2018-01-0321:48romainthere is also a package, maybe it's that: https://www.emacswiki.org/emacs/HighlightParentheses highlight-parentheses-mode#2018-01-0321:49justinlee@romain Yes I did mean that. Iāve now figured out that Iām getting confused because rainbow-delimiters and something else is interacting. I have now togged rainbow-delimiters off and Iām a lot closer to what I want. Basically I like what spacemacs does when Iām editing .spacemacs and want that it clojure mode#2018-01-0321:53justinlee@romain thanks: highlight-parentheses is the key. I was customizing something else.#2018-01-0323:08vuuvihow long do you guys keep your spacemacs running?#2018-01-0323:09vuuviIām currently going in on 13 days. I didnāt understand why people used to used to be so reticent to close the emacs but now I do, since I have all the files open I am going to touch in the near future and I like keeping cider open.#2018-01-0323:27agI'm an update freak though... I like updating packages every day. So many times things got broken because of that my habit, but I can't help it#2018-01-0400:10naomarikspacemacs tends to lockup daily for me, mostly when iām connected to a repl#2018-01-0400:15romainsometimes I get lost on what I've opened and what's currently running. So I just quit & restart ^^#2018-01-0401:19jeff.terrellI keep mine going for a while because I've gotten used to layouts and can't reliably restore a layout across a restart. Specifically, I have an exocortex layer with all my org files as well as the *Org Agenda* buffer. But that buffer isn't tied to a file, so Spacemacs can't open it automatically upon start or upon layer load.#2018-01-0406:37agwhy don't you modify org layout, so the files you need will open automatically when you do spc l o o#2018-01-0415:17jeff.terrellHmm, I didn't know about SPC l o oā¦interesting. It took me a while to find any documentation for it. The manual says:
> Custom perspective containing all the =org-agenda= buffers
Do you know what "org-agenda buffers" are? Does it mean all of the files in the org-agenda-files variable? Because it only ever seems to open my file, whereas the variable also has my file in it.#2018-01-0418:32agyes, mine is set to (setq org-agenda-files "~/org/.agenda-files")
it's a file where I list all my files that I want to contribute to the agenda, whenever I open agenda ALL those files get open automatically#2018-01-0418:44agyeah, custom layouts are dope, so for example, just a few days ago I realized that I keep creating a layout for the project I've been working on. So I did this:
(spacemacs|define-custom-layout "@finops-admin"
:binding "f"
:body (find-file "~/DevProjects/finops-admin/project.clj"))
now, every time I do spc l o f - it jumps to my project layout. niiiice#2018-01-0420:18jeff.terrellI had org-agenda-files set properly, but with a list instead of a file. I changed it to be a file like yours, but the layout still doesn't open both of the files I have listed in the file. It opens the first file then stops. If I swap the first and second lines, the new first one is the one opened. In that layout, no other buffers are listed with SPC b b. Nothing is printed in *Messages*. Dunno what the problem is, but oh wellā¦
Might have to look into custom layouts. Maybe that would solve my problem here. Thanks!#2018-01-0420:41agit is strange that it wouldn't open files in agenda list#2018-01-0420:41agare they in a single dir or scattered?#2018-01-0420:41agwhat org-directory is set to?#2018-01-0420:50jeff.terrellA single directory, and indeed, they're all in the same directory as what org-directory is set to.#2018-01-0420:52agmaybe something wrong with the one of the files? try unleashing org-lint on them. yup, that is a thing#2018-01-0421:04jeff.terrellOoh, I'll try that!#2018-01-0421:05jeff.terrellA couple of warnings about unknown fuzzy locations (probably because I archived some items that there were links targeting), but nothing major for either file. Good guess though!#2018-01-0401:20jeff.terrellCurrent uptime: 7 days.#2018-01-0407:39agDoes anyone know how to tweak auto-highlight-symbol.el so when I do * while cursor on foo, it would select everything "foo-related", :foo, ::foo/bar, foo/bar, zap/foo ?#2018-01-0409:13pesterhazy@ag, oh yes, tweaking * is very high on my list of things I'm missing in spacemacs (or ā more likely ā haven't discovered the right option for yet)#2018-01-0418:35aginterestingly I have discovered this yesterday. if you press * and it won't show any symbols (since it won't recognize :foo, foo/bar, etc.)
but then, you press esc, and then n - it suddenly shows them (like if you do search with / vim command#2018-01-0418:35agĀÆ\(ć)/ĀÆ#2018-01-0418:35agit's not ideal, but it kinda works#2018-01-0418:36agI would love though to find a more "natural" fix to this problem, then toggling
SPC t h a - would work too#2018-01-0418:40agdigging more into this problem I realized a few things:
1) CIDER guys have an open ticket https://github.com/clojure-emacs/cider/issues/1461
And it doesn't seem to be of high priority. Also I doubt that will work with Spacemacs out of the box. AFAIK none of the CIDER maintainers use Spacemacs
2) auto-highlight-symbol.el being published on MELPA is the fork of very old and kinda outdated package, and clojure is not in the list of "officially" supported modes. see ahs-modes var
3) Maybe one needs to tweak ahs-default-symbol-regexp. I tried to figure out correct regexp, but I have failed#2018-01-0409:13pesterhazyit's infuriating close to being super useful, but the last missing 20% break it for me#2018-01-0409:14pesterhazyessentially you want to tweak what * considers word boundaries, right?#2018-01-0415:11vuuviRe: the uptime discussion: itās interesting that you guys update often. I usually donāt like restarting because of the overhead it requires to get my repl back to a productive state, meaning I have lots of let expressions I need to run as well as defs mocking config input#2018-01-0418:52agBTW, thank you guys for upvotting the small PR to improve g d for clojure modes. It's now merged on develop branch and it jumps to definition (even if you don't have CIDER running). But. CIDER guys just added C-C C-: for keywords. But that binding is soooo inconvenient. You have to:
a) realize you want to search for keyword
b) you have to hold Ctrl, then press C, then hold Ctrl with Shift and press ; - completely awful
so I'm thinking this can be improved and baked into g d...#2018-01-0418:53agAlthough the binding is inconvenient (I'm glad at least we have that now) - unlike Cursive users#2018-01-0419:00agDamn it, I don't understand why this:
M-x clj-find-usages
To perform this op the project needs to be evaluated.
Analyzing a large project might take a while: hit C-g to abort.
(Set cljr-warn-on-eval to nil to analyze the project without warning)
Do you want to proceed? (y or n) y
error in process filter: cljr--maybe-rethrow-error: Only .clj files are supported!
Only .clj files are supported!
But why? What's the semantic difference between .cljs, .clj and .cljc in this case?
sigh... I guess I will never be able to tell my Cursive using colleague that CIDER is better#2018-01-0419:02eggsyntaxIIRC (questionable in this case), there's an open issue or comment thread somewhere talking about what it would take to do the generalization to cljc + cljs, and it didn't look all that huge for most of it. Probably just a matter of someone committing some time to it.#2018-01-0419:04eggsyntaxOne of these, maybe?
https://github.com/clojure-emacs/clj-refactor.el/issues/72
https://github.com/clojure-emacs/clj-refactor.el/issues/191#2018-01-0419:05eggsyntax#72 looks probably outdated.#2018-01-0419:06eggsyntaxI got a glance at some of that when I worked on https://github.com/clojure-emacs/clj-refactor.el/issues/394 , but it was pretty tangential.#2018-01-0419:09ag> Probably just a matter of someone committing some time to it
sigh... if only I wasn't so lazy and stupid. Alas I'm all of those things#2018-01-0419:10eggsyntaxRight there with you š#2018-01-0419:11eggsyntaxOr: busy and imperfect, on my good days š#2018-01-0419:21gzmaskany good workflow for 1.9 cli in spacemacs? I can't even get it running inside eshell#2018-01-0419:23gzmaskalso, what is the quickest way to change [...] to {...} ? such as paren-surround shotcuts?#2018-01-0419:26chriscs[}#2018-01-0419:27chrisc-hange s-urrounding [-square brace }-to curly brace#2018-01-0419:27chrisnote that the direction of the second brace actually matters, the opening brace/paren version (so [{() leaves a space#2018-01-0419:28christhe closing brace/paren does not leave a space#2018-01-0419:28christhe plugin is called evil-surround and is based on tpope's vim-surround if you need googleable things#2018-01-0419:29gzmaskperfect, works#2018-01-0419:50vuuvido you guys have any thoughts on literate programming? Iām currently exploring the idea of writing code in org mode files, as a way to organize my thoughts or provide a way to keep notes and thoughts organized as I move through code writing#2018-01-0419:52agI personally think literate programming generally is a bad idea. Unless you have a personality disorder and your second personality calls himself Professor Donald Knuth and wants to write series of books about programming#2018-01-0419:53agHowever... there are cases where org-mode's babel is sooooo dope. I love it#2018-01-0419:53vuuvilol#2018-01-0419:53vuuviwhat makes you say that ag?#2018-01-0419:53vuuviand what use cases do you have where babel is so dope?#2018-01-0419:54agI use it to manage my dotfiles...#2018-01-0419:55agmanaging configuration of ALL the stuff on my machine is in a single file now, and it's documented and it can even encrypt things#2018-01-0419:55aglike putting sensitive stuff in ~/.authinfo.gpg. And you can use the same mechanism of restoring config from a backup on all the systems (in my case linux and osx)#2018-01-0419:56agAlso org-mode is perfect way to use for showcasing/testing/documenting an API#2018-01-0419:57agusing restclient you can on the fly poke remote endpoints#2018-01-0419:59vuuviwow those are both really cool ideas#2018-01-0420:00vuuviI have seen demos of people using org mode for their .spacemacs#2018-01-0420:00agyeah, I've seen people having their entire emacs configs in a single .org file#2018-01-0420:02agusing org-mode for my dotfiles finally made me stop worrying about things scattered across my machines. Nothing else I tried before made it so simple yet very flexible. One day my work laptop has died. I've given a new machine. It took me like ten minutes to get everything restored back as I had on my previous.#2018-01-0420:06chrisso do you have babel tangle to a bunch of different files then?#2018-01-0420:06agyup...#2018-01-0420:08agand you can "stich" files together with multiple things. For example you can have section * public git where you tangle into ~/.gitconfig and then section ~/.gitconfig, but this time more sensitive stuff#2018-01-0420:08agyou can do it for different machines like this:
#+begin_src gitconfig :tangle (when (eq system-type 'darwin) "~/.gitconfig")
[gpg]
program = /usr/local/MacGPG2/bin/gpg2
#+end_src
#+begin_src gitconfig :tangle (when (eq system-type 'gnu/linux) "~/.gitconfig")
[gpg]
program = /usr/bin/gpg2
#+end_src
#2018-01-0420:09agif you need to create nested directories and then a file, you can use :mkdirp yes
#+begin_src sh :tangle (when (eq system-type 'darwin) "~/.gnupg/gpg-agent.conf") :mkdirp yes
pinentry-program /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac
#+end_src
#2018-01-0420:10agyou can encrypt things:
#+begin_src emacs-lisp :tangle ~/.authinfo.gpg
# -*- epa-file-encrypt-to: ("#2018-01-0420:10chrisI hadn't thought about putting everything in one file. I've seen other people rewriting their .spacemacs file into org and I didn't really understand the point, but the idea of having one master file to handle all of my dotfiles is incredibly appealing#2018-01-0420:11agyou can always split things into multiple files. Org can "include" other files#2018-01-0420:11agand it will still have a single "entrypoint" from where you run babel-tangle#2018-01-0420:12chrisI just have a ton of configs everywhere and I recently got a new machine and realized that my dotfiles were not up to par#2018-01-0420:12chrisI still don't have the new machine setup correctly#2018-01-0420:13agOh, my dotfile is like 3000 lines or something. And I always know where things are#2018-01-0420:13vuuviphew thatās intense hahah#2018-01-0420:13agtoo bad I can't share it - it has way too much to reveal#2018-01-0420:14vuuvihow did you learn about using babel ag?#2018-01-0420:14vuuviand maybe you can try to anonymize it? that would be super helpful#2018-01-0420:15ag> how did you learn about using babel ag?
there's not much to learn. Just create an .org file, add some source blocks something like I showed above, run M-x org-babel-tangle and voila#2018-01-0420:17agthe only thing I couldn't figure out is how to set the correct permissions after the files get created. I kinda did it with a hacky workaround - an elisp function and post-babel-tangle hook#2018-01-0420:17agI wish there was a simpler way though#2018-01-0420:19jeff.terrellHere's an example of using org-mode for emacs config.
https://github.com/cndreisbach/emacs.d#2018-01-0420:20jeff.terrellHaven't gone down that path myself.#2018-01-0420:20agand guys, totally check this thing out... it's amaaazing... https://github.com/zweifisch/ob-http#2018-01-0420:21jeff.terrellOh nice!#2018-01-0420:21agand guess what? the only thing you need to do is to add restclient layer#2018-01-0420:21vuuviwhat did do you to the configs of all of the apps? Was that annoying to change so that the dotfiles was all this one file?#2018-01-0420:23ag~au contraire, having it in a single file is absolutely cool~
sorry, got the question wrong:
no, it wasn't very difficult to gather things. You can do it piecemeal way - just every single time you want to change config of anything on the machine, instead of doing it directly in a related file, do it in your http://dotfile.org#2018-01-0420:23agit's easier to find things, easier to manage the changes - "diffing"#2018-01-0420:23ageasier to update things#2018-01-0420:24agit's kinda close to Clojure's core philosophy - your entire machine's configuration is immutable#2018-01-0420:25agevery time you do org-babel-tangle, you unroll new configuration#2018-01-0421:11vuuvithat makes a lot of sense#2018-01-0421:12vuuvido you use your org mode file to create all the configs?#2018-01-0420:21aghttps://github.com/syl20bnr/spacemacs/tree/master/layers/%2Btools/restclient#2018-01-0420:21jeff.terrell:thinking_face:#2018-01-0420:27agI hope you see how awesome babel is. Now to the sad part. Unfortunately, it's kind of PITA to make it work with Clojure. And even more so with Clojurescript. I've been thinking about finding a way to make it work with Lumo and create something like ob-lumo.el or whatever#2018-01-0420:27agbut again. I'm not just stupid or lazy. I'm both of those things ;(#2018-01-0420:56vuuvithatās super cool, thanks for showing us babel. Iām glad this whole conversation kicked off!#2018-01-0420:57vuuvialso you never explained your distaste for literate programming, it seems like it makes sense!#2018-01-0421:27agwell, literate programming I think is not suitable to solve business problems.#2018-01-0421:29vuuvithat makes sense. Iām really more interested in it for myself though. Thereās always a big difference between OSS / personal programming and professional code writing#2018-01-0421:52agI mean it's probably possible to use org-babel in a small team where everyone agree's to use it. And manage documentation/tests in that format#2018-01-0421:53agbut that's very unusual and it makes hard to replace team members if they decide to leave.#2018-01-0421:57agbut one may argue - same is true for Clojure, or any piece of tech#2018-01-0422:00agOrg is truly amazing, but I wish it was ported outside of Emacs. Vim has flaky version of it, but that's not enough. It would've been awesome to see people using Org-mode in Atom, VSCode, Intellij#2018-01-0422:15vuuvihaha We are currently having that problem with our team. If you have any clojure experience, thatās a HUGE plus#2018-01-0422:15vuuviYeah Org mode really should become more of a thing in other places. However, itās also nice that itās a secret? of emacs users? like itās the kind of thing that helps keep me in the emacs system and loving it#2018-01-0422:28agNot really. Because majority of people have no idea about existence of org, or cannot use it without learning Emacs they have to invent all sorts of markdown flavors, tools for note keeping, todo lists, blogging engines, publishing tools, etc, etc.#2018-01-0422:35vuuviyeah thatās a great point. FWIW the last markdowny notes taking thing I saw on HN all of the comments were about org mode#2018-01-0513:55chrisI write all my notes in org and just export it to whatever bullshit format we're using today#2018-01-0513:56chrispandoc and org-export are amazing pieces of software#2018-01-0515:29vuuviyeah they really are#2018-01-0516:10bfayI don't have strong opinions on literate programming, but I think Karsten Schmidt's http://thi.ng libraries are stunning examples https://github.com/thi-ng/geom#2018-01-0516:55vuuviwow @bfay I didnāt realize thing was written in a literate style. Thatās so cool! thanks for sharing.#2018-01-0614:23sam16Hello all, I have 2 systems on which i have my same spacemacs config
What i am trying to achieve is that according to my system's name different font size should be set in my spacemacs and i want to use the same .spacemacs for both my systems
I know it can be done using simple if else but i am lacking somewhere and i dont know why.
Currently i am achieving this using the below code in my user-init which is very inefficient
(if (string= (system-name) "sam16")
(setq-default dotspacemacs-default-font '("Source Code Pro"
:size 12
:weight normal
:width normal
:powerline-scale 1.1))
(setq-default dotspacemacs-default-font '("Source Code Pro"
:size 14
:weight normal
:width normal
:powerline-scale 1.1)))
I have this code commented too which i made by reading other peoples config in their dotspacemacs/init but i am not able to do it in my dotspacemacs/init hence doing the above in my user-init
default dotspacemacs-default-font '("Source Code Pro"
:size ,(if (string= (system-name) "sam16")
12
14)
:weight normal
:width normal
:powerline-scale 1.1)
All i want to change is the font-size according to the system-name i have tried many things and also searched alot but somewhere my knowledge lacks hence can someone help me out.#2018-01-0710:43tomayerstspacemacs newby question: Does anyone have an example .spacemacs for getting smart-parens and evil-smart-parens working?#2018-01-0814:59jeff.terrell@sam16 - I'm no elisp hacker, but both of those approaches look reasonable to me. The second one is probably what I'd be inclined to, given that it's shorter. Do they not work? What errors do you see related to their use (presumably in the *Messages* buffer)? Can you evaluate those expressions (maybe changing setq-default to setq) after startup time to debug and iterate?#2018-01-0815:02jeff.terrell@tomayerst - I don't sorry. I've gotten used to the evil-lisp-state (or whatever it is that ships with spacemacs under the SPC k menu) and haven't messed around with alternatives.#2018-01-0816:07vuuviseconding this ^ the spacemacs evil lisp state has proven to be the move effective tool for managing lisps in spacemacs for me.#2018-01-0817:42vuuviwhen writing in org mode, does anyone know of a way to get the text under a heading to be appropriately spaced over?#2018-01-0817:49jeff.terrellIf you start the top line with some space, a lot of times the rest of the lines will follow suit. E.g. with lists. But I don't know how to always do that.#2018-01-0817:49jeff.terrellThere was some way to indent everything visually without changing the file contents, but I'm forgetting how. Let me see if I can look that up.#2018-01-0817:51jeff.terrellAh, try this: M-x org-indent-mode. From here:
https://orgmode.org/manual/Clean-view.html#2018-01-0818:35ag@alexkeyes do this
(evil-define-key 'insert org-mode-map (kbd "RET") 'org-return-indent)
and now whenever you press RET while cursor at a heading, it will correctly indent the next line#2018-01-0818:57vuuvi@ag Thanks! My org mode files will always look good#2018-01-0921:18vuuvido you guys have any advice for working with python in spacemacs? I want to use the python repl more and I canāt figure out the best workflow. Iāve currently been writing my code and then interpreting it via , c c#2018-01-0922:13jeff.terrellI haven't tried using python in spacemacs. ĀÆ\(ć)/ĀÆ#2018-01-0922:14vuuviI just discovered py-live-mode thatās pretty cool#2018-01-0922:14vuuviit will interpret your python as you code live#2018-01-0922:14vuuviactivate it using spc m l when in python mode#2018-01-0923:35romainDid anyone install indium for JS?#2018-01-1016:26vuuvinever used it @romain#2018-01-1208:24ben.mumfordhi all, i'm running the following version of EMACS: "GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-09-20 on lcy01-07, modified by Debian" and the latest spacemacs and as of this morning my cider repl is no longer starting#2018-01-1208:24ben.mumfordany ideas on the reason?#2018-01-1210:05andre.stylianos@ben.mumford620 it was an issue this morning but it's been fixed and updated. Take a look at #cider, they mention what happened there.#2018-01-1210:14ben.mumfordstill seeing the problem#2018-01-1210:15ben.mumfordwhat do i need to do to fix it?#2018-01-1210:38andre.stylianosMaybe some caching problem? Just downloading the new version of refactor-nrepl that was pushed to clojars should fix it I think#2018-01-1210:44ben.mumfordi'll give it a try, thanks#2018-01-1210:47ben.mumfordworks! thank you#2018-01-1210:48andre.stylianosglad to help āļø#2018-01-1208:26ben.mumfordi see several SNAPSHOT versions being loaded on REPL startup cider-nrepl 0.17.0-SNAPSHOT for example. any chance something has gone wrong overnight?#2018-01-1209:05ben.mumfordin general is there a way to specify which dependencies to use (not SNAPSHOT versions of stuff for example). it's frustrating if something worked yesterday but not today#2018-01-1210:05andre.stylianos@ben.mumford620 it was an issue this morning but it's been fixed and updated. Take a look at #cider, they mention what happened there.#2018-01-1613:46jeff.terrellTIL that I can access the Spacemacs menu and major-mode menu while in insert mode with M-m and M-RET, respectively.
I needed this to insert links in org-mode (with , i l/`M-RET i l`). Doing it in insert mode solved two annoyances I had with doing the same in normal mode. First, it would insert with the same behavior as i in vim; that is, it would insert before the character at the cursor, which means you can't insert at the end of a line. Second, after I inserted a link, if I immediately hit A to append at the end of the line, my cursor would confusingly jump to the next line. (Until recently, I was typing links manually (in the org-mode format: [[url][text]]), but recently pasting a URL would link-ify that text, which really got in the way.)#2018-01-1614:54shanNice, thatās useful for all the cider commands that use the last-sexp as having the cursor on the end parent/bracket in normal mode doesnāt include that in the last-sexp#2018-01-1616:13vuuvioh cool I didnāt know about the M-RET#2018-01-1618:36ag@jeff.terrell C-C C-l in org-mode inserts a link too#2018-01-1619:26vuuviIāve found myself using , i l frequently as well too#2018-01-1619:35vuuviespecially since I can expect the spacemacs commands to be similar when working with a variety of markup languages and frameworks#2018-01-1619:40agI'm on the other hand getting myself more familiar with "native" org-mode bindings. Sometimes it feels Spacemacs is moving too fast and keybindings still change.#2018-01-1619:41agwhereas org-mode keybindings less likely to change... unless someone decides to override it in Spacemacs#2018-01-1619:43agtake for example clocking-in and clocking out commands. Spacemacs keybindings are in different places. Most org-mode keys are under C-c C...#2018-01-1619:45agoh... wait... seems I'm wrong... the keys are now both under , C#2018-01-1619:45agnice#2018-01-1619:46agbut there are still some keys that under SPC a o and some of them are in ,#2018-01-1619:46agconfusing#2018-01-1619:54vuuvithatās true#2018-01-1619:54vuuvithat is confusing#2018-01-1619:55vuuvithe biggest argument that holds traction against spacemacs is the fact the keybindings seem to change a lot, and not in a way thatās well explained#2018-01-1619:55vuuvior obvious#2018-01-1622:54agI think I saw an issue someone posted, asking if it's possible to create a tool that would find all the keybindings that Spacemacs overrides.#2018-01-1622:55agit would be nice indeed to see list of keybindings that used to be bound to something else and later on in some point in the config get overriden#2018-01-1623:02vuuviI havenāt actually gotten burned by that, I just know that people complain about#2018-01-1713:15jeff.terrellI haven't felt much pain there either. Although I guess it is a bit difficult to interpret things like cider documentation that are full of emacs keybindings. But ĀÆ\(ć)/ĀÆ#2018-01-1715:29vuuviIāve never really dove into the documentation of any of these tools since I figured I can trust the semantic keybindings and learn a new thing one at a time.#2018-01-1719:56ScotHi all, does anyone know of a way to have evil-escape like behaviour, but that puts you into evil-lisp-state instead of evil-normal-state? I would like fd to put me into normal state and jk to put me into lisp state (I am trying to avoid the situation of a long key-sequence to insert a symbol from evil-lisp-state and return to it, which is currently i <type in characters> fd SPC k . and usually ends up with a bunch of mistaken navigation between fd and SPC k because I expect evil-lisp-state)#2018-01-1809:14pesterhazyHelp! How do I set the javascript indentation level in spacemacs? It is set to 2 and this doesn't work: (setq-default js2-basic-offset 4)
(setq-default js-indent-level 4)
#2018-01-1809:15pesterhazyahh!!#2018-01-1809:15pesterhazythe minute I write this I realize that I have a .editorconfig overriding these settings#2018-01-1809:15pesterhazyfacepalm#2018-01-2112:38zaneIn the Clojure layer is it possible to disable clj-refactor entirely?#2018-01-2116:23romain@zane https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#exclusion ?#2018-01-2118:28zaneAwesome. Thanks, @romain!#2018-01-2119:26zaneWhere is the right place to put (setq <layer>-excluded-packages '(package1 package2 ...)?#2018-01-2123:51romainIn user-init I think#2018-01-2202:26ag@zane just add clj-refactor into dotspacemacs-excluded-packages#2018-01-2217:18zane@ag Yep. I did that it seems like the instructions romain posted may be out-of-date?#2018-01-2217:18zaneI put it in dotspacemacs-excluded-packages an then sadly ran into this bug: https://github.com/syl20bnr/spacemacs/issues/3424#2018-01-2217:27agso what's wrong with clj-refactor, why do you need to remove it?#2018-01-2217:33zaneI've got everything in a reasonable place now, but since you're asking: clj-refactor has some conflicts with Clojure 1.9 that trigger warnings. I was trying to get rid of those warnings to make the other warnings more visible / trustworthy.#2018-01-2218:34vuuvidoes anyone here use shells in emacs? Trying to figure out if itās the kind of thing I can do to improve my workflow or if itās not something people really do.#2018-01-2219:24agmy tmux config got kinda borked after updating, I stopped using it (until I'd clean up and fix my config). And then I decided to try eshell. I'm mostly using eshell now. My tmux config still borked, I do sometimes run things in iTerm (with no tmux)#2018-01-2219:25ageshell is cool#2018-01-2219:48vuuviwhatās your workflow like? How was it learning eshell?#2018-01-2220:02practicalli-johnny@alexkeyes I use zsh for my standard treminal setup. So I configured Spacemacs to use the same shell using multi-term https://practicalli.github.io/spacemacs/create-a-project/using-emacs-eshell.html#2018-01-2220:03vuuvioh cool#2018-01-2220:04practicalli-johnnyI also used ohmyzshell to configure my zsh setup. Works really well. Some themes may not work as well inside Emacs though,#2018-01-2220:51vuuviyeah oh my zsh is great#2018-01-2220:53vuuvialso thanks for writing that gitbook @jr0cket! Itās great Iāve used it a ton and shown it to people.#2018-01-2221:41practicalli-johnnyOne day I will finish that gitbook...#2018-01-2222:52vuuviWould like any help?#2018-01-2223:47agdoes anyone know what's needed to start using cljfmt in Spacemacs? just adding lein plugin dependency to your profiles enough?#2018-01-2503:03callumAre we supposed to get all of the snippets from yasnippet-snippets in spacemacs? Iām on the latest in master and am only seeing a very minimal amount of snippets getting loaded. e.g. yas-describe-tables in emacs-lisp-mode gives me:
Snippet table `emacs-lisp-mode'
----------------------------------------------------------------------------------------------------
group state name key binding
----------------------------------------------------------------------------------------------------
(top level) (a) micro-state micro
(a) new-package newp
#2018-01-2503:09callumIt seems like a change for this was recently pulled into the develop branch by way of https://github.com/syl20bnr/spacemacs/pull/10156#2018-01-2504:30callumThis seems to work if I pull in the develop branch, but doesnāt work if I simply add the snippet from the PR above. I guess Iām missing somethingā¦#2018-01-2619:00PBAnyone using parinfer over paredit?#2018-01-2619:00PBI'm also running into this error when trying to include updates on my .spacemacs
** TEST: [[file:/Users/me/.spacemacs::dotspacemacs-mode-line-theme][dotspacemacs-mode-line-theme]] is 'spacemacs, 'all-the-icons, 'custom, 'vim-powerline or 'vanilla or a list with `car' one of the previous values and properties one of the following: `:separator' or `:separator-scale'
*** FAIL: nil
#2018-01-2619:01PBHas anyone seen this?#2018-01-2620:35vuuvinope!#2018-01-2620:36vuuviI use smart-parens mode#2018-01-2705:27naomarikwhen using org mode does anyone else experience like 7 seconds delay when expanding a subtree 3 levels deep?#2018-01-2715:43jeff.terrell@naomarik - Noā¦how many lines in your file? How many headers (`grep -c '^*' <file>.org`)?#2018-01-2717:37naomarikdoesnāt matter how big the file is, i can open up a scratch buffer and as soon as i indent to the 3rd point it just sits there for awhile. iāve always had this issue as long as i can remember#2018-01-2717:38naomarikit just does it once though, after the first time it loads whatever it seems to be okay with subsequent bulletpoints#2018-01-2721:59ag@naomarik that could be happening for all different reasons without using profiler it would be hard to pin down exact cause. #2018-01-2807:59naomarikitās something in the org-bullet package thatās causing it for me, removed it and problem gone#2018-02-0103:17wallydraghello people, i have been using spacemacs for clojure projects for a while now. Suddenly jump-to-definition for clojure started to fail and revert back to dumb search#2018-02-0103:18wallydragalso repl in spacemacs shows this warning CIDER's version (0.16.0-snapshot) does not match cider-nrepl's version (nil). Things will break!#2018-02-0103:19wallydraginterestingly my lein profile has different versions of these things, so I am not sure from where spacemacs is picking up this version#2018-02-0103:20ag@wallydrag are you jacking-in or using cider-connect?#2018-02-0103:21wallydragcider-connect#2018-02-0103:22wallydrag@ag i was also looking at this issue https://github.com/syl20bnr/spacemacs/issues/8663 š#2018-02-0103:22agcider connect does not ensure al neccessary cider-middleware gets injected#2018-02-0103:23agyou etiher outta jack-in or inject all necessary cider middleware yourself#2018-02-0103:24wallydrag@ag where you able to fix jump to defn on your spacemacs#2018-02-0103:25wallydragI would like to use cider connect because I would already have repl server running for most of my projects#2018-02-0103:25aghttps://cider.readthedocs.io/en/latest/installation/#ciders-nrepl-middleware#2018-02-0103:25wallydragalso cider-jack-in fails on spacemacs, it is unable to start the repl server#2018-02-0103:26wallydragwent through that doc as well š#2018-02-0103:27agtry removing all cider and clojure-mode related dirs from elpa dir (or simply nuke it) and reinstall all the things#2018-02-0103:28ag> my lein profile has different versions of these things
your problem lies not in spacemacs#2018-02-0103:29agtry commenting out things in lein profile and jack in#2018-02-0103:29wallydragdoing this https://clojurians.slack.com/archives/C09C8GRLY/p1517455741000031#2018-02-0103:29agif you fix cider-jack-in, them maybe you can move back to cider-connect and fix the middleware#2018-02-0103:34wallydrag1 - commented out my lein profile, restarted everything, did not work#2018-02-0103:35wallydrag2 - deleted clojure layer, reinstalled again, did not work#2018-02-0103:35wallydragalso i am getting these errors#2018-02-0103:36agnot clojure layer... move entire elpa directory in ~/.emacs.d somewhere else. make sure you're using latest spacemacs. I would actually recommend switching to develop branch. ironically it is more stable#2018-02-0103:37agit will take sometime to reinstall all the packages.#2018-02-0103:38agcider-find-var is broken (and my guess would be) among other things like edn-format because cider has version conflict#2018-02-0103:39agthis is what I'd do:
cd ~/.emacs.d
xargs rm -rf <.gitignore
git reset --hard
git pull --rebase
but first back up things (just in case)!!!#2018-02-0103:42agsometimes things get break legitimately (e.g. when Batsov deploys new version) then you may want to pin down the exact version of cider. But I don't think this is that case#2018-02-0103:44wallydrag@ag so after 1 and 2 steps, what I did now is simply do a cider jack in, it was able to start server and did not connect, i did a cider connect on top of it and jump to definition works š#2018-02-0103:47wallydragignore, it stopped working once i restarted emacs š#2018-02-0103:54wallydragAlright, I am starting to doubt nrepl started by my code, cider-jack-in with cider connect on top of it is working#2018-02-0103:54wallydraganyways, thanks @ag for the help#2018-02-0619:13PBAnyone here using parinfer in spacemacs? I'm having an issue where spacemacs can't find that layer
** TEST: Each layer in [[file:/Users/me/.spacemacs::dotspacemacs-configuration-layers][dotspacemacs-configuration-layers]] can be found
....
*** FAIL: parinfer
#2018-02-0621:36ag@petr are you on master?#2018-02-0621:36PBI am#2018-02-0621:36agtry switching to develop#2018-02-0621:36PBHmm ok#2018-02-0621:36PBI'll do so and report back#2018-02-0621:37agprobably you also would like nuke/backup your .cache and elpa dirs#2018-02-0621:38agwhat I usually do xargs rm -rf <.gitignore && git reset --hard. Use that on your own risk#2018-02-0913:40joshkhi'm pretty new to spacemacs. i see it supports clojure symbol replacement using clojure-enable-fancify-symbols which works fine, but is there a way for me to add more symbols to replace such as defn?#2018-02-0913:59chrisif you look at the source for clojure/fancify-symbols (which is in funcs.el in the clojure layer)#2018-02-0913:59chrisyou'll see that it is just adding things to font-lock-add-keywords MODE#2018-02-0914:00chrisso presumably you can just call that function directly from your code to add additional symbols#2018-02-0914:02joshkhhey that's great, thanks chris!#2018-02-0914:02chrisnp#2018-02-0914:07joshkhapologies for the newbie questions, but is the standard way of wrapping with parens / brackets, expanding selections, slurping etc really to drop out of insert mode and use the SPC v and SPC k menus? is there a way to stay in insert mode? for instance in cursive i can just ctrl + shift + ( and my current form gets wrapped.#2018-02-0914:18chrisyou can just use whatever you have set as dotspacemacs-emacs-leader-key k w#2018-02-0914:18chrisI just use evil-surround, personally#2018-02-0914:24joshkhthanks. i'll look into it.#2018-02-0914:58joshkherm, last question, but how do i paste (yank?) from outside emacs into the buffer?#2018-02-0915:06chriswhat part isn't working? That's pretty much always 'just worked' for me#2018-02-0915:10joshkhi'm sure it's just me missing some fundamentals (and learning both vim modes and emacs). C + y was only pasting the first letter of what i had on the clipboard but hitting it again seemed to work. thanks!#2018-02-0915:11chrishmm, that's weird. are you using hybrid editing mode?#2018-02-0915:15joshkhfresh out of the box in evil mode, as far as i can tell#2018-02-0915:17chrisyou're on spacemacs right? near the top of the dotspacemacs-init function there's a var called dotspacemacs-editing-style#2018-02-0915:18chrismine is set to vim#2018-02-0915:18chrisand when I'm in insert most emacs style keybindings are not bound (so C-y doesn't yank into the buffer, for example)#2018-02-0915:19chrisif you set it to hybrid you can get most emacs things bound when in insert#2018-02-0915:19chrisymmv though, the only time I used it (which was awhile ago) it was pretty buggy#2018-02-0915:23joshkhyup, looks like i'm using vim mode as well. maybe i'll start over with a new spacemacs instance just for good luck.#2018-02-0915:25jeff.terrell@joshkh - Regarding wrapping with parens etc, you can do that in insert mode. Try M-m k w in insert mode, for example. However, those SPC k commands take you out of insert mode afterward and into the transient state, so you can't really stay in insert mode with those anyway. (Other commands might let you.) I think if that's important to you, other paredit-style editing packages for emacs might serve you better.#2018-02-0915:27jeff.terrellAlso, in macOS, I have success pasting in insert mode with command-v like with other apps.#2018-02-0915:36joshkhthanks for the info. i'll first wrap my head around the default setup before getting crazy with customization. i'm sure the community has put together a great starting point and that i'm just feeling the learning curve of a new editor. on a side note, chris, editing fancify-symbols worked well for me.#2018-02-0915:59Drew Verleeif i want to run multiple Clojure projects whats the way to do that in spacemacs? In intelliji is multi projects. in emacs/spacemacs is it multiple buffers?#2018-02-0917:25mccraigmccraig@drewverlee projectile works pretty well - although i'm not sure which spacemacs layer is bringing it in to my config#2018-02-0917:44Drew Verleeyea. it seems its straight forward it just happend to not work with the directory i was trying to jump into.#2018-02-0917:45Drew Verleeprojectile-switch-project or something#2018-02-0918:04ag>if i want to run multiple Clojure projects whats the way to do that in spacemacs?
use layouts aka persps. SPC l#2018-02-0918:06ag"layouts" and "eyebrowse" are two extremely handy tools, first one you'd use to keep separate context for every project, second - for multiple window configs within a single project#2018-02-0918:08age.g. SPC l 1 foo then open "project Foo", SPC l 2 then open "project Bar" - you have two different contexts for two projects, you can switch between them using "layouts keys" - check SPC l ?#2018-02-0918:09agthen within "project Foo" you may have one window config with two vertical splits for "code", and then if you want to have a different set of windows and buffers for "tests" you can create it with SPC l w#2018-02-1005:04Drew Verlee@ag thats perfect thanks!#2018-02-1005:16Drew Verleeiām confused. there is a parinfer layer. but when i add it to my dotspacemacs-configuration-layers list and restart emacs i get a uknown layer error for parinfer.#2018-02-1213:33pabloreYou have to change your .emacs.d git repo to the develop branch#2018-02-1005:17Drew Verleemaybe the layer is very new and now in my version or something#2018-02-1214:56jeff.terrellI'm noticing that, in org-mode, TAB (bound to org-cycle to expand/collapse headings) counts as a repeat-worthy command, thus interfering with my . (`evil-repeat`) command. Is there a way to prevent TAB from being repeatable in that sense?#2018-02-1215:23jeff.terrellTIL two ways to avoid clobbering my default register when yanking or deleting text in Vim/Spacemacs:
1. Use the "black hole" register, "_, on the second yank/delete, to avoid affecting registers.
2. Use the "2 numbered register on the paste to paste not the default content but the previously yanked/deleted content.
Also, SPC r e in Spacemacs and :reg in vim will show the current contents of the registers.#2018-02-1215:25chrisSPC r y also shows the kill-ring#2018-02-1215:52vuuviI used spc r y#2018-02-1215:53jeff.terrellNice, I love it. Thanks for the tip y'all. š#2018-02-1215:58vuuvi@jeff.terrell always!#2018-02-1218:50pabloreIf I have to screen in a vertical split, how do I move them so they are in a horizontal split?#2018-02-1218:51agspc w H#2018-02-1218:52pabloreit was spc w J, but thanks anyway#2018-02-1222:05agoh yeah, I was answering from my phone, the one I said is for the other way around#2018-02-1312:17lemonsHeya. Is there anything special I need to do to get spacemacs to respect macro indentation metadata? According to docs https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/clojure#indentation this should be working out of the box if I have cider-dynamic-indentation enabled, which I do#2018-02-1318:06ag@lemons I'm not sure what exactly you mean, maybe put-clojure-indent?#2018-02-1318:19agso for example I have something like this:
(dolist (form '(re-frame.core/reg-sub
re-frame.core/reg-fx
re-frame.core/reg-sub
re-frame.core/reg-event-fx
re-frame.core/reg-event-db))
(put-clojure-indent form 1))
so now if I write:
(re-frame.core/reg-fx ::foo
|
)
it places the cursor there, and not indented all the way on the right#2018-02-1408:17lemons@ag not exactly. After reading cider and spacemacs docs I thought that if some macro has a style indentation metadata, code will be formatted appropriately out of the box. e.g. (defmacro POST [& args] {:style/indent 2} ...) should be indented with two spaces. That wasn't the case for me however. But today I tried it again and it's being indented properly so I don't know what to think anymore#2018-02-1500:49pabloreHas anyone got linting working within spacemacs? Iām trying to make squiggly-clojure work but am getting flycheck errors#2018-02-1501:30agI'm using joker. works nice @pablore #2018-02-1523:03agEvil and evil packages are great though... it would take a significant amount of effort to make things work with Neovim. and the benefits are questionable.#2018-02-1523:05agIntelliJ decided they don't want integration with Neovim. I understand that Vim integration is not a selling point for them and they've invested a lot into making IdeaVim and it is still far from being good#2018-02-1523:06agEvil/Spacemacs on the other hand is very solid..... it's way too good. Sometimes it feels it's better than in can be done in Vim#2018-02-1613:43jeff.terrellI was pretty sure when I started using Spacemacs that I'd run into enough vim-compatibility disparities to dislike the experience. I was all braced for itā¦then it didn't happen. There are a few issues, but they're outweighed by the other evil features, not to mention being able to use magit and org-mode.#2018-02-1613:44jeff.terrellI was just helping a junior colleague with vim-in-Atom yesterday. (I've been trying to encourage him to learn vim-style editing, and he's receptive.) But we discovered that, if vim-in-Atom does have an ex mode, it isn't accessed with :. This is the kind of detail that evil gets right.#2018-02-1615:02vuuviwait what? how does that work??#2018-02-1615:02vuuvi: commands are a major part of vim!#2018-02-1615:06shan:q! š¬#2018-02-1615:10vuuviIāve actually started to make a point of using vim on things that arenāt my dev machine. I want to get stronger at vim and thereās really only one way to do that#2018-02-1615:12jeff.terrellYeah apparently they think you should use default Atom menus/shortcuts to do that. Also looks like there's another addon package that adds ex mode.#2018-02-1615:13jeff.terrellRe: getting stronger at vim-style editing, lots of vim users I know don't make adequate use of the . key. That's one of the very best features of vim, IMO.#2018-02-1617:01gieschiirc atom's ex-mode is just a separate plugin because it was in an alpha state for a long time#2018-02-1618:14agto be completely fair though. evil-ex does not bring complete set of commands from vim. but it brings just enough. And I'd say more than enough: https://gist.github.com/agzam/acd3b5e311f8f7e87e21b550856f65e1#2018-02-1618:15agI haven't seen any other Vim emulators doing better job#2018-02-1619:06vuuvithanks for the guide @ag#2018-02-1619:10agwell, it's not the guide, just a list of commands š
it would be probably cool to add examples of extended use of commands, e.g, ! stylelint % --fixor others#2018-02-1719:34twashingAnyone know howto include a local theme in Spacemacs? https://emacs.stackexchange.com/questions/38888/howto-include-a-local-theme-in-spacemacs#2018-02-1719:34twashingI seem to be having a lot of trouble with Firebelly: https://github.com/startling/firebelly#2018-02-1814:04pabloreWith local you mean project-specific?#2018-02-1814:06pablorefor custom themes I just add the melpa package to my dotspacemacs-additional-packages and then added it to my dotspacemacs-themes#2018-02-1819:44twashing@pablore I tried i) adding a separate layer with this config
(defconst firebelly-packages
'((firebelly :location local)))
#2018-02-1819:45twashingAnd ii) an entry in .spacemacs.d/init.el.
dotspacemacs-additional-packages
'((firebelly :location (recipe :fetcher github :repo "startling/firebelly")))
#2018-02-1819:45twashingā¦
both approaches failed.#2018-02-1921:22ag@twashing try symlinking theme file into ~/.emacs.d#2018-02-2104:52twashingHey @ag I tried that out. But it didnāt work.#2018-02-2104:56aghere's what I do:
1) add path to dir with the theme.el to add-to-list 'custom-theme-load-path
2) add theme into dotspacemacs-themes
3) and symlink the theme.el to ~/.emacs.d#2018-02-2104:55twashingHappy to pair on in at some point. As far as I can tell though, the dotspacemacs-additional-packages github fetcher seems broken.
dotspacemacs-additional-packages
'(hcl-mode
(firebelly :location (recipe :fetcher github :repo "startling/firebelly")))
#2018-02-2104:57agoh, in your case I believe you need to add it as firebelly-theme#2018-02-2104:58ag(firebelly-theme :location ,,,, etc#2018-02-2104:58agI thought you're trying to load custom local theme#2018-02-2105:00twashingNope. No dice.
Warnings:
- An error occurred while applying the theme "firebelly", fallback on theme
"spacemacs-dark". Error was: (error Package 'firebelly-theme-' is unavailable)
- Please check the value of "dotspacemacs-themes" in your dotfile or open an issue
so we can add support for the theme "firebelly".
- tern binary not found
#2018-02-2105:01twashingFor thisā¦
dotspacemacs-additional-packages
'(hcl-mode
(firebelly-theme :location (recipe :fetcher github :repo "startling/firebelly")))
#2018-02-2105:02agdoes it fetch the it at all?#2018-02-2105:03twashingEmacsā messages window doesnāt say what failed. Just that message,#2018-02-2105:04aglemme try something here#2018-02-2105:13twashingOops, I lied. In the messages pane, Emacs gives these messages:
...
(Spacemacs) --> installing package:
#2018-02-2105:14twashingAnd thatās when I changed to:
dotspacemacs-additional-packages
'(hcl-mode
(firebelly-theme :location (recipe :fetcher github :repo "startling/firebelly")))
#2018-02-2105:14agso it did download it#2018-02-2105:14twashingRight#2018-02-2105:14agnow I think you just need to load it load-theme 'firebelly#2018-02-2105:15agand then add it to dotspacemacs-themes#2018-02-2105:15agso you can switch between light and dark#2018-02-2105:15agthat's what usually people do#2018-02-2105:16twashingI just blew away elpa/ and .cache/#2018-02-2105:17agyeah, I do that sometimes...
xargs rm -rf <.gitignore#2018-02-2105:17twashingload-theme 'firebelly is something I that I expected that config in init.el to handle⦠But letās see#2018-02-2105:17agyeah, custom themes are pain#2018-02-2105:18twashingYeaaah šŖ#2018-02-2105:18agthe other day TX got really pissed at someone, they've decided to change bunch of colors in his favorite theme#2018-02-2105:18aghe spent half a day trying to restore original colors#2018-02-2105:18aglolsob#2018-02-2105:18twashingLol!#2018-02-2105:19agyou still in the city or you moved down south?#2018-02-2105:19agthere's Emacs meetup on Thursday#2018-02-2105:19agin the city#2018-02-2105:19twashingAh ok. Iām down in San Jose, atm.#2018-02-2105:20twashingLooks like that worked, btw. So thanks! I owe you a beer.#2018-02-2105:21agno problem! glad I was able to help. usually that's not the case#2018-02-2105:23twashingWell I know the inner workings of Spacemacs a bit better now. Theme name has to match the theme symbol at runtime (which both can be different than the file name)ā¦#2018-02-2105:23twashingSigh :)#2018-02-2105:23twashingAnyways. I take it this is the Emacs meetup.
https://www.meetup.com/Emacs-SF/?_cookie-check=OJX0mj9PaghtWh1U#2018-02-2105:23twashingIām gonna try to make it.#2018-02-2105:25agyeah, it's small but cozy š guys been struggling to find a venue. I tried to talk to our guys - my management well... wasn't very enthusiastic about it#2018-02-2105:27aglast time it was really good. John Wigley was in the city, he showed some mindblowing stuff in org#2018-02-2105:27twashingHmm, nice!#2018-02-2105:04twashingk#2018-02-2308:04kurt-o-sysAnyone knowing any good presentation layers that support clj/cljs-repl to use inside spacemacs? I'm not talking about exporting to html, reveal etc, but presentation layers like epresent and S5 (which both are based on org-mode, which is cool). What I'm actually after is something like epresent and S5, but with editable code blocks that can be evaluated inline. Not sure if it exists, but it'd be amazing if that's possible š.#2018-02-2313:09chrisif they are based on org, do they just use org babel blocks?#2018-02-2313:09chrisusing clj(s) from org-babel is possible (though I hear it's tricky to set up)#2018-02-2313:42naomarikanyone using spacemacs in windows? was trying it out and thereās a subtle flicker when scrolling that isnāt present on my setup in macos#2018-02-2315:07kurt-o-sys@chris yeah... can't seem to make clj/cljs to work with org mode properly.#2018-02-2315:43chrisI wish I could help more, I have seen people successfully get it to work but I can't find any good blogs or anything#2018-02-2315:43chrissorry š#2018-02-2318:33agMy hands are itching to write a package that works with Lumo. sadly I'm too lazy and too busy and too stupid - all at the same time#2018-02-2407:40spfeiffer@naomarik Yes, i can confirm that. Scrolling is not that nice under windows. I did some googling and trying things out, but with no success. I will live with that.#2018-02-2407:47naomarik@spfeiffer thatās unfortunate but glad itās not just me. it seems jonathan blow doesnāt have this issue with his emacs setup but heās not using spacemacs#2018-02-2408:09spfeiffer@naomarik I found some blog posts and stuff detailing steps to improve that behaviour, but nothing helped for me. Win 10 Pro, Emacs 26 here.#2018-02-2408:49spfeifferBut back then i was on emacs 25. Perhaps i should investigate again?#2018-02-2510:25naomarikif you do let me know š#2018-02-2510:26naomarikiāve tried both on the spacemacs recommended version and the latest, ver 27#2018-02-2517:37spfeifferThere is an emacs 27 build for windows? I thought 26 was the newest one#2018-02-2522:00spfeiffer@naomarik I invested some more hours to go through all blog posts, reddit, hacker news, stack overflow, spacemacs issues that somehow seem to be related to scrolling performance issues under windows, but no success. It stays as choppy as before. I will live with that āŗļø#2018-02-2608:00naomarikthatās unfortunate ;/ thanks for the update š#2018-02-2611:15kurt-o-sysI'm trying to run clojure source blocks from org mode... I guess I'm missing some basic setup: when running M-x cider-jack-in:
The clojure executable isn't on your `exec-path'
#2018-02-2611:16kurt-o-syshow can I make clojure work in org mode (I guess it's via cider, so how to make cider work with org-mode)?#2018-02-2611:26kurt-o-systhe directory where lein is, is on my classpath#2018-02-2612:31kurt-o-syssolved š#2018-02-2620:13pabloreI have this problem with neotree in spacemacs that I didnt have with nerdtree in vim and is very frustating:
I have 2 buffers open on a vertical split, then I open neotree and select a file, that file will always open on the left window. Is there a way to tell neotree to open a file on the rightmost window, or the window of my selection?#2018-02-2620:25jeff.terrellI don't know. I have gotten accustomed to the fuzzy finding abilities of commands like SPC p f, SPC b b, and SPC f f. But you might try snooping around by seeing what function gets invoked upon your neotree keypress in question via SPC h d k. It's possible there's a customizable neotree variable that might control this behavior.#2018-02-2620:52pabloreChords are complex :s#2018-02-2700:16ag@pablore, that's why I don't use neotree or treemacs. I use direx. It lets me have a tree in a buffer of my choosing. I also wrote a function to open file from the tree in any surrounding buffer. e.g. o h - opens the file placing it on the left side, o j - in the bottom, and so on. Here's spacemacs layer for that:#2018-02-2700:16aghttps://github.com/agzam/dot-spacemacs/tree/master/layers/ag-dired#2018-02-2709:54spfeiffer@pablore Does this help: https://www.reddit.com/r/spacemacs/comments/7phdqy/is_it_possible_to_open_a_file_on_a_specific/ ?#2018-02-2709:55spfeifferUsing ā2 lā as told in the comments?#2018-02-2710:44spfeifferYes, it works. It is ā<window number> lā.#2018-02-2722:48agthis turned out to be is especially handy when used with Chrome dev tools#2018-02-2722:49practicalli-johnnyThat's cool. Is that the Emacs plugin for Chrome? Or is there a specific thing for the Slack app?#2018-02-2722:50agnope...#2018-02-2722:53agthis is of my own baking. basically I'm calling emacsclient with custom frame and invoking a function, but before that I'm emulating "Select All" + "Copy" and then when frame opens, I yank what's in clipboard, then there's a minor mode that when pressed C-c C-c puts the buffer content back into clipboard, and kills the frame, then the script pastes it (into previous app), essentially overwriting what was previously selected by "Select All"#2018-02-2722:54agthis doesn't work in Linux though.. I have to figure out yet how to make that work in Linux#2018-02-2722:54agthis is for OSX#2018-02-2722:56practicalli-johnnyNice work. #2018-02-2722:57agthanks,... it's a bit "dirty" right now, it works as part of my Hammerspoon config, and not documented at all#2018-02-2722:58agI guess one can use applescript to get the same thing to work without Hammerspoon#2018-02-2801:17jeff.terrellVery nice, @ag. š Any plans to share it? I might like to take it for a spin.#2018-02-2802:09agof course, the problem is - it's a bit tangled. I'm using Hammerspoon and a bit of emacs-lisp code. It's not documented at all. Here's my commit to hammerspoon config:
https://github.com/agzam/spacehammer/commit/db2e8551feccbdbcbdecaf5950ecb838e7dd6e7e
this is associated emacs-lisp
https://github.com/agzam/dot-spacemacs/blob/master/layers/ag-general/funcs.el#L100-L149#2018-02-2802:13agI was very surprised how easy it was to make it. But I have no idea how to make it work in Linux. Also decoupling from hammerspoon and making it into an emacs package would be nice, I guess.#2018-02-2802:19agping me if you have any questions#2018-02-2803:16jeff.terrellAwesome, thanks!#2018-03-0113:39shanAnyone know how to get better diffs for test failures in spacemacs?#2018-03-0118:46agwe use pjstadig/humane-test-output#2018-03-0114:18jeff.terrellDo you mean like expected vs. actual collections are different, and you want the test failure output to show more clearly where they're different? If so, that seems like less of a spacemacs thing and more of a test library thing. I think speclj might do this, and midje might too. (Lots of people don't like midje; on the other hand, I've been enjoying speclj lately.)#2018-03-0117:55shanIām looking for clearer test output. Need to stick with clojure.test really. https://github.com/venantius/ultra seems good, will have to see how well it plays with cider/spacemacs#2018-03-0115:12chrisI use https://github.com/venantius/ultra#2018-03-0116:12timoIs there a possibility to eval a defn in spacemacs and save the output somewhere, like inserting it after the defn?#2018-03-0116:29jeff.terrell@timok - You can do it manually of course: send an expression to the connected cider repl (with , s e I think), then switch to the REPL buffer, copy the result, and paste it into your source buffer. (Though that might not be as interesting on a defn form since IIRC it just returns the var.)
I think there may be a cider function to do those steps for you, too. I'd poke around in the helm buffer for SPC SPC cider- and see if anything looks like what you want. If you find something you like, you can create a keybinding for it.#2018-03-0116:31timothanks! I will have a look at it#2018-03-0118:08ag@timok you mean clojure defn or emacs-lisp?#2018-03-0118:10agif you give an universal argument to cider-eval-last-sexp it inserts the result in the current buffer#2018-03-0118:14timo@ag I mean clojure defn#2018-03-0118:15timoand I know , e f but searching for something that inserts the result into repl or current buffer. I read that this exists in clojureverse but couldn't find it#2018-03-0118:37ag@timok that's what I said: if you do SPC u , e f - it will put the result back into current buffer#2018-03-0118:38agalthough I would suggest to rebind C-u to 'universal-argument, that's Emacs's default and it used a lot#2018-03-0118:39agSpacemacs unbinds C-u and bind universal-argument to SPC u#2018-03-0118:40timo@ag thanks! will try that tomorrow#2018-03-0118:57spfeifferAnd why is C-u better than SPC u?#2018-03-0119:14jeff.terrellYeah, I'm an old vimmer, so I don't want to unbind C-u (scroll a half-page up). simple_smile#2018-03-0119:14jeff.terrellNice tip about the SPC u prefix for that command, @ag. š#2018-03-0119:19ag> And why is C-u better than SPC u?
because it's accessible not just in NORMAL mode. Once you realize that universal-argument is used a lot in Emacs - you would want to have a simple binding for it.
Value of universal argument is far more than simply scrolling up half a page#2018-03-0119:19agIMO#2018-03-0119:27spfeifferAh, i see. You are right.#2018-03-0119:36agyeah, there are many, many cases where universal argument makes a difference. simple examples:
- in magit-diff - RET - visits file in other-window
- in org mode - TAB - collapses/expands things differently
- ag - SPC s f - supplied with an argument, lets you search only in specific kind of files
- org-clock-in - with an argument lets you choose a task from the latest ones
etc, etc.#2018-03-0210:07jumarsuper-useful, thank you so much.#2018-03-0208:22timoSPC s f is awesome! I didn't know about that. Do you find this in the spacemacs-docs? I went through it a bit but missed this. I know there is tons of stuff to use in spacemacs and I am merely at 10% maybe;)#2018-03-0209:09spfeifferI feel like i am at 1%, and still consider myself quite productive. TBH, i never used C-u or SPC u ever.#2018-03-0213:21jeff.terrellSweet! Didn't know about SPC s f. Note that if you're wanting to search within the current buffer's file, SPC s S will do that (saving a step compared to the more general SPC s f).#2018-03-0218:27agIt's too bad Emacs/Spacemacs doesn't have very clear way of indicating if a command can take an universal argument. I made a habit - if I use something a lot - I will always try to check docs for the function.#2018-03-0218:29agthere are many, many simple examples I can count - like do you use SPC f j - dired-jump? Now if you give it an argument -it prompts for the folder#2018-03-0218:37jeff.terrell@ag - I was thinking about it more, how do you scroll up if you rebound C-u? Do you use C-b, or what?#2018-03-0218:37agC-e/C-y#2018-03-0218:37jeff.terrellDo you say like 20 C-y, or just hold it down?#2018-03-0219:00agthat's a very good question, C-e/C-y is very useful (at least it used to be) because unlike j/k - it stores the number argument. So if you do 20 C-y then it does scroll 20, and then if you do C-y again - it keeps it scrolling by 20 lines. That's how it is in Vim. Unfortunately, this seems changed in evil. It used to be just like in Vim.#2018-03-0219:02jeff.terrellThat's not how my vim worksā¦the second C-y just scrolls by one line.#2018-03-0219:03aghmm... I always assumed that's not how it should work#2018-03-0219:03jeff.terrellĀÆ\(ć)/ĀÆ#2018-03-0219:03agmaybe I'm now imagining things#2018-03-0219:05agI was sure that's how it used to work... damn it...#2018-03-0219:05agI'm going slightly mad#2018-03-0219:07jeff.terrellHappens to the best of usā¦#2018-03-0219:14agAnd I was so close to unleash my rage in a github issue...#2018-03-0219:15agnow I think I understand why my colleagues avoid talking to me about editors/IDEs#2018-03-0218:39agDo you know about SPC N j/k?#2018-03-0218:40jeff.terrellI don't have SPC N anything, nor SPC n j/k. Is that something on the develop branch?#2018-03-0218:41aghttps://twitter.com/iLemming/status/933452886431866882#2018-03-0218:42ag> in master it seems to be SPC n by the way#2018-03-0218:45jeff.terrellWeird, I'm not seeing that option. I'm on version {:tag :a, :attrs {:href "/cdn-cgi/l/email-protection", :class "__cf_email__", :data-cfemail "f1c1dfc3c1c1dfc0c2b1c3c4dfc2dfc0"}, :content ("[emailĀ protected]")}, which spacemacs/check-for-new-version says is the latest version.#2018-03-0218:47jeff.terrellThat's neat though. I think I'm comfortable enough with all the scrolling bindings I probably wouldn't use that, but I can see the utility for sure. š#2018-03-0218:50agdoes SPC h d d spacemacs/scroll-transient-state shows anything?#2018-03-0218:56jeff.terrellYeah, and if I invoke the transient state manually, it shows up. But it's anemic compared to what you showed. You can only scroll up or down by half (`<`/`>`) or full (`,`/`.`) pages.#2018-03-0517:14zaneTrying to rebind a couple keys in cider inspection mode and am coming up short:
(evil-define-key '(normal motion) cider-inspector-mode-map
"p" 'cider-inspector-prev-page
"N" 'cider-inspector-prev-page)
#2018-03-0517:14zaneAm I doing something wrong?#2018-03-0520:07agis it working when you eval it?#2018-03-0615:19kurt-o-sysJust wondering... anyone ever got cljs running in org mode source code blocks?#2018-03-0620:27jeff.terrellI haven't tried, but if you get it running, I'd be interested to know that it's possible.#2018-03-0620:34felipebarros@kurt-o-sys Yeah, playing with https://maria.cloud made me think that an easy and functional setup for literate programming through org-babel and CLJS would be awesome.#2018-03-0621:33kurt-o-sysYeah, I'd love to see it work for presentations/talks. Not sure how to make it work, though.#2018-03-0700:04PBThis is so annoying, anytime I update spacemacs it breaks my config#2018-03-0700:11ag@petr
- "doctor, whenever I stretch my leg and try to put it around my head, it really hurts"
- "well, maybe don't do that?"
š
can you elaborate what's breaking?#2018-03-0700:13PBIt's just frustrating. Everytime I update spacemacs there appears to be something missing from the new file. In this case it's dotspacemacs-mode-line-theme. I updated that. However. Now when I try to start a cljs repl. It does not seem to initialize figwheel properly. And asks me which cljs repl I'd like to start. If I revert to my old .spacemacs file. It is all good again#2018-03-0700:13PBThe problem is that I have several machines. And provision new ones pretty frequently, so this cannot be avoided#2018-03-0700:15agto be fair though, most of the time it is not a problem of Spacemacs, but it is an upstream issue. This is exactly the case. CIDER guys updated a few things#2018-03-0700:16agmaybe jump to #cider and check my conversation with Dan Sutton a few hours ago#2018-03-0700:16aghttps://clojurians.slack.com/archives/C0617A8PQ/p1520358862000231#2018-03-0700:17PBI just found that#2018-03-0700:17PBThank you#2018-03-0700:47PBThis is the option that appears to be breaking things for me:
;; If non-nil, a form that evaluates to a package directory. For example, to
;; use different package directories for different Emacs versions, set this
;; to `emacs-version'.
dotspacemacs-elpa-subdirectory 'emacs-version
#2018-03-0707:20agWhen was the last time you did SPC f e D ?#2018-03-0701:47Drew VerleeWhare are my options for changing the name of a function and having that change happen everywhere its used? Or, more generally, how to do ppl make those kinds of changes in spacemcas?#2018-03-0707:21agDefine "everywhere". Project wise?#2018-03-0707:21agOr in a file?#2018-03-0707:25agFor the former you can do SPC *, then C-c C-e then either use multiple cursors or iEdit to make changes, then C-c C-c saves *all* the files#2018-03-0716:31Drew VerleeIn a project. Iām using projectile (i think thats the name).#2018-03-0718:01aghttps://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#replacing-text-in-several-files#2018-03-1006:05Drew VerleeThanks!!!#2018-03-0808:11kurt-o-sysso, by trying to run cljs in org-mode source blocks... ob-clojure makes use of cider, which connects to the clj repl. When I run a cljs project, I start 2 repls: one for clj and one for cljs. How can I tell org mode babel to connect to the cljs repl instead of the clj repl?#2018-03-0808:21kurt-o-sysnice... one can choose the repl using M-x cider-toggle-connection-buffer RET#2018-03-0808:23kurt-o-sysand set it to the cljs buffer. It is using rhino, not node, which means console is not available. (rhino uses print instead of console.log.) Maybe it's possible to let emacs use node instead of rhino, so one is more in line with the more common use case.#2018-03-0910:59mccraigmccraigis it possible to (straightforwardly) add things to the spacemacs menus ? i'd like to add helm-projectile-ag somewhere, maybe even replace the helm-project-do-ag at SPC s a p#2018-03-0911:24practicalli-johnny@mccraigmccraig Yes, it's really easy. Just find the layer in .emacs.d/layers and edit the packages.el file. In your case I believe it's layers/+completion/helm/packages.el#2018-03-0911:25practicalli-johnnyYou may want to create a new branch in git for your change. Or you can create a personal package if you have a collection of changes#2018-03-0911:28mccraigmccraighuh, actually i think in this case it's a PR - it's a bit odd that it's using helm-do-ag (rather than helm-projectile-ag) against the projectile-project-root https://github.com/syl20bnr/spacemacs/blob/master/layers/%2Bcompletion/helm/packages.el#L318#2018-03-0911:28mccraigmccraig(the difference being that helm-projectile-ag respects your projectile path exclusions, so search results aren't full of build-artefact junk)#2018-03-0913:11jeff.terrell@mccraigmccraig - You don't need to edit any spacemacs files, and doing so might complicate upgrades later. Spacemacs leaves a gap in the top-level menu, under o, for custom user stuff. Here's a snippet from my dotspacemacs/user-config:
(spacemacs/declare-prefix "o" "jst-bindings") ; the prefixes are not required; they just label the group
(spacemacs/declare-prefix "oc" "customize")
(spacemacs/set-leader-keys "ocg" 'customize-group)
(spacemacs/set-leader-keys "oco" 'customize-option)
You can also set leader keys under anything else, at the risk of having them conflict with Spacemacs builtins later.#2018-03-0922:28agyou can specify multiple keybinding in set-leader-keys
(spacemacs/set-leader-keys
"ocg" 'customize-group
"oco" 'customize-option)
#2018-03-1001:30ivanahello! I'm not understand after what, but my spacemacs starts to check bracket inside the ;; comments and do not load files in REPL. can I getting back normal behaviour?#2018-03-1002:45ivanai add this hook http://grokbase.com/t/gg/swank-clojure/11b8px0z8r/unmatched-bracket-or-quote but without an result#2018-03-1003:51ivanai solve the problem - parse-sexp-ignore-comments conflicts with reseting syntax-table#2018-03-1022:01spfeifferHi Podcast-Vijay āŗļø#2018-03-1023:13mathpunkI like using CIDER 90% of the time. But I'm also interested in experimenting with repls and subrepls, and I'm thinking I should try inf-clojure. Does anyone have both CIDER and inf-clojure integrated into their spacemacs setups?#2018-03-1023:14mathpunkI don't know if it's hard at all, but my emacs-lisp is pretty weak. I would want to keep the ability to send forms to the repl from my buffer#2018-03-1109:41vijaykiran@spfeiffer Hello š#2018-03-1215:10pablorejust found out about SPC T Z and now Iām tripping#2018-03-1220:19eggsyntaxI don't have that one -- what is it?#2018-03-1220:20eggsyntaxMust be zone-mode? Doesn't seem to do anything for me.#2018-03-1312:12pabloreAre you on the develop branch?#2018-03-1313:26eggsyntaxNope, master.#2018-03-1321:06pabloredevelop has all the sweetness#2018-03-1215:31vijaykiranI suggest M-x zone-when-idle 3 š#2018-03-1215:31vijaykiranIncase you want to stop the madness - zone-leave-me-alone#2018-03-1217:50pablorethis is what hacking looks like#2018-03-1218:47agyeah, totally they should've used emacs screen with zone in Westworld, instead screenshots of react source code#2018-03-1220:24eggsyntaxAfter a recent SM + package update, I'm getting this horribly obnoxious behavior -- when I start a helm command that pops up a separate popup buffer in the current frame (eg SPC p h), it instead opens it in a totally separate frame, ie a popup window (in the OS sense of window). Worse, the active window is often still the original window in the background, so when I start typing chars (eg a few chars of a filename to search for) it starts doing random things in the background that I don't see.
Anyone else encountered this nasty little bugger? I'm struggling not to throw my laptop out the window...#2018-03-1220:24eggsyntaxAlso hi y'all! š#2018-03-1220:26eggsyntaxI have to actually click into the popup with the mouse to get it to respond š±#2018-03-1220:26eggsyntaxWhen it happens, I get this in the terminal from which I started emacs: (emacs:19446): Gtk-WARNING **: gtk_window_parse_geometry() called on a window with no visible children; the window should be set up before gtk_window_parse_geometry() is called.#2018-03-1220:39eggsyntaxWhew, found it. To prevent this, you need to
(setq helm-use-frame-when-more-than-two-windows nil)
That variable was added in a recent helm commit, and apparently the author decided everyone would want this hideous behavior š š#2018-03-1220:40eggsyntaxBit of detail at https://emacs.stackexchange.com/questions/39311/prevent-helm-from-opening-in-a-new-frame#2018-03-1220:41jeff.terrellYikesāthat does sound like quite the annoying default.#2018-03-1223:14practicalli-johnny@eggsyntax recommended way to switch back to previous Helm behaviour (i.e. no pop-up) is to add this to the layer section in ~/.spacemacs
(helm :variables
helm-use-frame-when-more-than-two-windows nil)
#2018-03-1302:20eggsyntaxLovely, thanks!#2018-03-1416:39eggsyntaxAnyone using cider-default-cljs-repl in their project? I must be doing something wrong. I haven't messed with .dir-locals.el before, so I'm probably just doing something dopey with the format. Anyone have a spare clue?
Here's the .dir-locals.el file in my project root dir, in its entirety:
((cider-repl-mode . ((cider-default-cljs-repl "Figwheel"))))
#2018-03-1416:41eggsyntaxWrong mode, apparently. I used nil instead of cider-repl-mode (nil meaning "all modes") & it works fine.#2018-03-1514:26practicalli-johnnyIs there a layer variable that can be set to show the Clojure REPL buffer once a REPL has started with cider-jack-in. Or any other suggestions for automatically showing the REPL buffer once the REPL has started.#2018-03-1516:04agAfaik using the hooks is the only good way#2018-03-1518:31practicalli-johnnyI found a hook that worked, so I'll add it to my book. Same setting didn't work as a variable though as I think it's being over-ridden by the Clojure layer package.el (an assumption)#2018-03-1607:24spfeifferBook? There is a book about spacemacs? bananadance#2018-03-1616:15practicalli-johnnyI've started a book on Spacemacs and Clojure development, still lots of stuff to add though.
https://practicalli.github.io/spacemacs#2018-03-1617:54pesterhazyit's already pretty great!#2018-03-1618:12n2oI've got a small layer for you @jr0cket to lint clojure code as you type: https://github.com/n2o/clojure-lint-spacemacs-layer#2018-03-1618:14spfeiffer@jr0cket Wow, that is great!#2018-03-1619:35pesterhazysweet @U1PCFQUR3#2018-03-1609:25andre.stylianos@jr0cket there was a mention of this in the cider channel recently, setting (setq cider-repl-pop-to-buffer-on-connect 'display-only) inside dotspacemacs/user-config worked for me.
https://cider.readthedocs.io/en/stable/using_the_repl/#behavior-on-connect#2018-03-1616:17practicalli-johnnyThanks. I added this as a hook for cider in the dotspacemacs/user-config.
I don't use this myself, but quiet a few people I know wanted to know.#2018-03-1612:25jeff.terrellTIL about org-agenda-transient-mode, available via M-SPC in an agenda buffer. Pretty nifty!#2018-03-1620:33agyah, that thing is pretty cool#2018-03-1721:04Daniel HinesAm I correct in understanding that if I want to use Parinfer in Spacemacs, I need to checkout the pull request https://github.com/syl20bnr/spacemacs/pull/7339 ?#2018-03-1721:05Daniel HinesI.e, Parinfer hasn't made it into "official" Spacemacs, and there aren't plans to do so?#2018-03-1721:37spfeifferIt is in the devolop branchā¦#2018-03-1721:38spfeifferI can only recommend to switch to develop.#2018-03-1803:17Daniel HinesOk, thanks.#2018-03-1902:48Drew Verleeiām looking at the commands for sayid and having trouble understanding how they map to my setup:
https://bpiel.github.io/sayid/#documentation
for instance:
C-c s ! -- Disble traces, eval current buffer, enable traces, clear the workspace log
when i press C-c then s i get āundefinedā. Iām in the habit of pressing alt x which brings up a very helpful menu where i can search for things. there are a lot of sayid functions, but the names are descriptive enough for me to be sure how they work. How can i got about seeing relating the commands on that sheet to the commands in my menu?#2018-03-1902:54bpielI don't use spacemacs and didn't write the integration, so I might not be helpful, but ...#2018-03-1902:56bpielif you C-h f and look up a sayid function (like sayid-get-workspace), do you get a *Help* buffer? and if so, does it tell you what the binding is?#2018-03-1902:58bpieloh also, you need to be in a clojure-mode buffer for the key bindings to be available#2018-03-1902:59bpiel@drewverlee ^^#2018-03-1902:59Drew Verleethanks @bpiel iām trying that nowā¦#2018-03-1903:00bpielok. I thought maybe I took too long and you left#2018-03-1903:00Drew Verleenope nope. I get the help buffer. it doesnāt seem to tell me the binding#2018-03-1903:01Drew VerleeThe descriptions are there though#2018-03-1903:01Drew Verleeor there is a description#2018-03-1903:01bpielmaybe manually run sayid-setup-package and then open a new clj buffer?#2018-03-1903:06Drew VerleeYea now it shows what the commands are bound to#2018-03-1903:06Drew Verleewhat does setup package do? is that a generic function setup-package that i can run after any package install?#2018-03-1903:08bpielI'm not sure how common it is for packages to have a setup-package function. I believe the approach was recommended to me during the process of getting sayid.el accepted to melpa#2018-03-1903:09bpielsayid-setup-package just sets up the key bindings#2018-03-1903:09Drew Verleefrom a beginners perspective, without having that working, its very confusing how to tie things together.
I donāt know how people get used to emacs world without mentors honestlyā¦.#2018-03-1903:09bpielhttps://github.com/bpiel/sayid/blob/20a92323c3edc060c521aa93edab9dad47646b4f/src/el/sayid.el#L990#2018-03-1903:10Drew VerleeBut this is awesome. Thanks a ton for the help#2018-03-1903:10bpielyeah, emacs can only be passed down#2018-03-1903:10bpielno problem. Let me know if any other problems/questions come up#2018-03-1903:11bpieland yeah.. I don't know why the call to sayid-setup-package can't be baked into the spacemacs/clojure layer, but, like I said, I don't know much about spacemacs#2018-03-1903:12bpielIf you are going to add this to init.el (or comparable), this should do it:
https://github.com/bpiel/sayid/blob/20a92323c3edc060c521aa93edab9dad47646b4f/src/el/sayid.el#L29-L30#2018-03-1904:47Drew Verlee@bpiel somehow i dont get the same options in the sayid buffer. For example N from the docs doesnt exist.#2018-03-1904:48Drew Verleei would like to upload the image, but apperently were out of space š#2018-03-1904:48Drew Verleeill probably be offline for a while.#2018-03-1907:20bpiel@drewverlee N was removed. Site didn't get updated#2018-03-1923:20Drew Verleeah#2018-03-2000:25agI think someone's not too long ago was curious: "what so nice and unique about eshell"
https://twitter.com/iLemming/status/975889923571003393#2018-03-2012:35achikinI have issues downloading packages from elpa#2018-03-2012:39achikinI have no idea what is going on#2018-03-2013:51achikinhttps://github.com/syl20bnr/spacemacs/issues/10500#2018-03-2014:29dimaDid you try removing ~/.emacs.d completely and run spacemacs installation from beginning?#2018-03-2014:37chrismv elpa elpa.bak and restart emacs#2018-03-2014:38chrissometimes emacs gets confused about which packages it has installed and then freaks out#2018-03-2014:46achikinI have already tried deleting the whole .emacs.d and re-cloning it#2018-03-2014:46achikinStill get those messages#2018-03-2014:50achikinI have even tried to move away my .spacemacs#2018-03-2014:50achikinDoes not help either#2018-03-2014:54achikinHmmm, I wiped out both .spacemacs and .emacs and everything is working as expected#2018-03-2017:10ag@achikin from time to time I run git clean -Xdf in ~/.emacs.d and let it install and recompile all the packages. Most of the time it doesn't hurt. I had a few times a problem with that, that turned out to be thing in my config (I would change something in one of my own layers, that doesn't affect anything unless I get to a clean slate). Sometimes it is hard to track down problem such that. In that case I would disable all the layers, and then start adding them one-by-one, until I find the one that causes the error.#2018-03-2017:13achikin@ag thank you. Finally I did sonething like this - removed emacs.d, removed all configs and reinstalled from scratch#2018-03-2017:15agyeah, it's a bit drastic... git clean cool though. Try running it with -n key, that way it will do "dry run": and will not actually delete things, but shows you what would be deleted#2018-03-2021:03spfeiffer@jr0cket I hope you don't mind minimal PRs, i found small errors in the key combos for changing line numbering while reading along.#2018-03-2111:06practicalli-johnnyComments and PRs are most welcome. Thank you.#2018-03-2520:22practicalli-johnnyYour PR merged, thanks again#2018-03-2211:15mccraigmccraigis it possible to trigger the autocomplete popup with a key ? i find the popup useful some of the time, but having it trigger automatically drives me nuts...#2018-03-2211:22pesterhazy@mccraigmccraig same... how I disable autocomplete?#2018-03-2217:05ag@mccraigmccraig maybe try increasing auto-completion-idle-delay#2018-03-2217:23mccraigmccraig@ag i seem to be using company, rather than auto-complete so i have company-idle-delay - i'd much rather have the popup be manual though - if i want auto-complete then i know and want it quickly, if i don't want it i don't ever want it to appear#2018-03-2217:24agthen try company-auto-complete#2018-03-2602:08Josh HorwitzI'm' trying to map m to do what % does is normal mode, does anyone know how I would re-map that?#2018-03-2618:14agbut then you'd lose the ability to set markers (easily)#2018-03-2618:48agtry:
(define-key evil-normal-state-map "m" 'evil-jump-item)#2018-03-2622:23Josh HorwitzThanks. I have never used markers before, how would you use them?#2018-03-2622:26agjust like in Vim... http://vim.wikia.com/wiki/Using_marks#2018-03-2622:33agIf I can suggest: always check first if there's a binding that corresponds to a keycord (before rebinding it to something else). Press C-h k and then the key#2018-03-2621:22fedregI'm not sure if this is a spacemacs or cider problem but sometimes when I get a compiler error my emacs window "blows up" with a bunch of extra buffers. So I may have have two buffers open in a window, split horizontally, and then compiler error happens and boom, I now have 10+ buffer windows; all the same file as the one I was trying to compile. Happens intermittently. Anyone else have this issue? thx!!!#2018-03-2622:16agthis sounds like a CIDER problem and probably it is. Remember: in Spacemacs you can always go back to previous window config by pressing SPC w u#2018-03-2706:56fedregThanks @U0G75ARHC! That is going to be really useful!#2018-03-2702:26feihongHow do I add a custom command to the menu that appears when I press ,? For example, I want to run (reset) on the Clojure repl without having switch to the repl buffer and typing it in.#2018-03-2716:15jeff.terrellTry this: http://spacemacs.org/doc/DOCUMENTATION.html#binding-keys
I think spacemacs/set-leader-keys-for-major-mode is the one you want.#2018-03-2901:09practicalli-johnnySo when you press , in normal mode it brings up the menu for the current major mode. These definitions are in the packages.el file in each layer. If relevant to you, watch my video of adding a new menu item a new item and contributing it back to the Spacemacs Clojure layer as a pull request.
https://youtu.be/tS9MkQwhSDg#2018-03-2901:10practicalli-johnnyOr just skip to 2.30 in the video and see where I've added the menu item#2018-03-2711:02vijaykiran@ag Just wanted to thank you for all the tweets on M-x Tips! š:skin-tone-4:#2018-03-2714:56agOh, thank you for your kind words Vijay! "M-x tips" has become a great deal of joy and pleasure for me. It kinda started spontaneously. After I posted one tip, I thought I can post another, then one more, but soon I realized a few mistakes I made:
- I probably needed to create a separate twitter account (now I can't post anything of personal)
- Twitter might be not the best format (It kinda sucks, to be honest)
- I wanted to post things targeted to intermediate/advanced Emacs/Spacemacs users, but it's difficult to draw a line (what's easy? what's advanced?)
- It's getting harder for me to think about things that can fit into a single tweet. I'm thinking about mini youtube tutorials/tips (unfortunately full-time job makes that a bit arduous).
Of course I will continue exploring and sharing my experience. I've never been much of evangelist, I am not a native English speaker and fear of making even smallest mistake still haunts me all the time. It made me appreciate more the work you do. Posting a tweet takes a tiny effort, compared to preparing and recording a podcast. You guys really šŖØ my world! Thank you! And please keep carrying this torch, people need to be enlightened.#2018-03-2719:53spfeifferYes, it is great. Thank you!#2018-03-2817:33aghttps://twitter.com/arohner/status/978361391240368130#2018-03-2817:35agAlthough real hardcore emacs zealots would do it like this:
C-u 2 C-x 8 RET KANNADA LETTER TTHA C-b _
and spacemacs folks:
2 C-x 8 RET KANNADA LETTER TTHA h _#2018-03-2819:44spfeifferAfter 'h', i need 'a' to switch to append mode, right?#2018-03-2819:44spfeifferTo insert the underscore?#2018-03-2819:45spfeifferBut c-x 8 is crazy stuff āŗļø#2018-03-2820:10agaww... shit.. yeah, you're right... missed that one. damn it#2018-03-2820:16agyeah C-x 8 scares the shit out of me sometimes... last week our designers used numero sign (instead of pound) for "Number of" thing, everyone was like: "so what's the correct unicode, how do we show it on the page?",
and I'm like "hold my beer... C-x 8 RET NUMERO SIGN... done"#2018-03-2820:24spfeifferNumero sign? Never heard of it āŗļø#2018-03-2820:28spfeifferI am scared how much i do not know about Emacsā¦#2018-03-2821:42agdon't worry, I wake up in cold sweat almost every night thinking I will never learn Emacs#2018-03-2817:43agIf you're not doing crazy things in Emacs - then you're using it wrong#2018-03-2823:27jeff.terrellWow, I did not know about C-x 8. Interesting. I might have to play around with that, but then again I might just stick with SPC i u (a.k.a. helm-ucs) for now.#2018-03-2823:37agholy shit @jeff.terrell I had no idea that thing exists#2018-03-2823:37jeff.terrellš Pretty cool huh?#2018-03-2823:51agyeah, it's basically improved version of C-x 8 RET#2018-03-2903:18spfeifferYou guys blow my mind⦠š#2018-03-3101:21fedregHow do I prevent my logs from being truncated in the repl? For exmaple, logging out a list of 100 items would result in (1 2 3...85 ...) without the last elements being printed. Coworkers with regular Emacs don't have this. Thx!#2018-03-3107:52spfeiffer@fedreg Isn't this controlled by *print-length* inside the REPL? But might me spcemacs sets this to 85?#2018-03-3107:53spfeifferbe spacemacs#2018-03-3113:42spfeiffer@fedreg I just tested using /cdn-cgi/l/email-protection and clojure 1.9.0: I can easily print out beyond 85 in the repl buffer.#2018-03-3113:44spfeifferBut *print-length* is set to 100⦠So i can only guess $something sets it to 85 for you.#2018-03-3113:45spfeifferWhat is the value of *print-length* in your repl buffer?#2018-03-3114:07spfeifferThere is a CIDER variable for setting it, too: cider-repl-print-length.#2018-03-3118:43fedreg@spfeiffer Thanks! It wasn't cutting off at 85; that was just an arbitrary number I used. Looks like 100 was the cutoff. I will use the cider-repl-print-length var you suggested. Thanks for the help!!!#2018-03-3118:47spfeiffer@fedreg Ah OK, i see. But still, it has nothing to do with spacemacs vs. emacs, it must be a configuration thing in cider.#2018-03-3118:48spfeifferBut by using the variable, you can customize it to your liking.#2018-03-3118:55fedreg@spfeiffer Yes, that did the trick. Appreciate it#2018-04-0213:37lemonsHey. Is there a way to configure specific indentation rules for macros? Right now I'm writing some rest services using compojure-api and this is what I end up with
(context "/api/v1/accounts" []
:tags ["Accounts"]
(GET "/" []
:summary "Retrieves all accounts"
(ok (accounts-repository/all)))
(POST "/" []
:return Account-Response
:body [acc Account]
:summary "Create an account"
(ok (accounts-repository/insert acc)))
(context "/:account-id" []
:path-params [account-id :- s/Int]
(GET "/" []
:summary "Retrieve account by id"
(ok (accounts-repository/find-by-id account-id)))
(context "/transactions" []
(GET "/" []
:summary "Retrieve transactions for account"
(ok (transactions-repository/all)))))))
what I would like is this indentation style:
(context "/hello-async" []
(resource
{:coercion :spec
:get {:parameters {:query-params (s/keys :req-un [::name])}
:responses {200 {:schema (s/keys :req-un [::message])}}
:handler (fn [{{:keys [name]} :query-params}]
(a/go
(a/<! (a/timeout 500))
(ok {:message (str "Hello, " name)})))}}))
is there a way to do this?#2018-04-0214:10spfeifferDoes this help? https://github.com/clojure-emacs/cider/blob/master/doc/indent_spec.md#2018-04-0214:13spfeifferI have no experience with this, but i stumbled across the docucentation. Perhaps it helps.#2018-04-0215:53jeff.terrellIIRC, the indent spec is for when you're the author of the macro. Otherwise, use indentation overrides for clojure-mode, as documented here:
https://github.com/clojure-emacs/clojure-mode#indentation-options#2018-04-0215:53jeff.terrell@lemons ^^#2018-04-0215:54jeff.terrellFor example, I have this in my dotspacemacs/user-config, for using speclj for testing:
(with-eval-after-load 'clojure
(define-clojure-indent
(describe 1)
(context 1)
(it 1)
(with 1)))
#2018-04-0216:24spfeiffer@jeff.terrell Ah ok, sorry for pointing in a wrong directionā¦#2018-04-0216:25jeff.terrellHa, no worries, it's an easy mistake to make. simple_smile#2018-04-0216:25jeff.terrellBesides, better to try and fail than not to try, right?#2018-04-0216:40spfeifferYeah, but obviously it had nothing to do with CIDER, but clojure-mode, so i had the wrong association. Nice you are into that stuff āŗļø#2018-04-0216:25lemonsThanks, that does look like what I need. I'm having problems getting it to work though... I've added this into my user-config section:
(with-eval-after-load 'clojure
(define-clojure-indent
(->> 1)))
but this macro is still being formatted as usual
(->> a
b)
any ideas? I'm kinda new to spacemacs#2018-04-0216:25lemonsyeah no worries š#2018-04-0216:27jeff.terrellTry it in the ex-mode line while editing a Clojure buffer, e.g. :(define-clojure-indent (->> 1)) from normal mode.#2018-04-0216:27jeff.terrell(I'm assuming you're using vim-style editing, i.e. "evil mode" in Spacemacs, btw.)#2018-04-0216:28jeff.terrellThen go to the beginning of your ->> expression and type =% to indent according to the current rules.#2018-04-0216:28lemonsthat did work#2018-04-0216:29lemonsit would seem my init code isn't executed or is overwritten somehow#2018-04-0216:41spfeiffer@lemons Did you reload using SPC f-e-R?#2018-04-0216:43lemonsyeah. I've added some printing inside with-eval-after-load call to make sure the code was not called#2018-04-0216:48spfeifferWell, sometimes i feel like i have to restart spacemacs to make things work#2018-04-0216:48jeff.terrell@lemons - I'm not sure, but I wonder if clojure-mode is only loaded once, when a clj file is first encountered.#2018-04-0216:48jeff.terrellSo yeah, to tag on what @spfeiffer said, if you restart spacemacs and load a clj file, is the with-eval-after-load code still not being executed?#2018-04-0216:56spfeifferYeah, might be the mode gets not reinitialized.#2018-04-0216:59lemons(with-eval-after-load 'clojure-mode <----
theres apparently two different packages/libraries/whatever this thing is in emacs. clojure-mode is the one I needed#2018-04-0217:01lemonsthanks for the help guys!#2018-04-0217:01spfeifferAh, it was clojure vs clojure-mode?#2018-04-0217:01lemonsyep#2018-04-0217:04jeff.terrellAh, didn't notice that, but it's obvious in retrospect, isn't it? simple_smile Glad you got it figured out.#2018-04-0217:06lemonsyeah, and now I know a tiny little bit about emacs. How to print messages to help debugging for example#2018-04-0411:12prncHi everyone! Trying to switch from vim to spacemacs. I found editing clojure in vim + surround + vim-sexp (w/ tpope's mappings) really easy the SPC k lisp state (?) on the other hand not so much. If there are any relatively recent Vim converts here: what do you use for your (simple) "structural editing" needs?#2018-04-0412:12jeff.terrell@prnc - Welcome to Spacemacs. simple_smile I think all the vim-surround stuff should work out of the box in Spacemacs. As for paredit-style stuff, I just use SPC k, but seems like we get questions here fairly often about switching to some other structural editing library, so you're not alone.#2018-04-0412:14jeff.terrellI don't know what people tend to prefer, nor what the story is for getting it working in Spacemacs, but if I were doing it I think I'd look into things like dotspacemacs-additional-packages and (with-eval-after-load 'clojure-mode ...) in my config.#2018-04-0412:25shan@prnc have you got any examples of some editing that youād do in VIM? someone here might know how best to do it in spacemacs#2018-04-0412:52prnc@jeff.terrell cheers! happy to be using spacemacs, so far there's loads of things that I like (I've always had a severe case of org-mode envy) trying to figure out a comfortable (from vim users perspective) editing workflow for Clojure#2018-04-0412:53prnc@shan I mostly wanted to understand what the options are in general, I guess a lot of what I want is already there but need to start customising this to my liking. Having said that...#2018-04-0412:55shansome vim-surround stuff is built into the spacemacs evil mode#2018-04-0412:55shanlike cs["#2018-04-0412:56prnc...here is a simple example: starting with (range | 100) (where | is the cursor)
* I want to evaluate that surrounding sexp (I would do cpp) in vim
* I want to transform it into (filter even? (range | 100)) I would press ,I (custom sexp mapping) and get the whole thing wrapped, dropped in insert mode with space inserted so I would just have to type filter even? to get what I want#2018-04-0510:15shanHad a little look on how to do some of the above but only found long winded ways so far.
for the (range | 100) evaluation, assuming youāre in normal mode, you either have to select the sexp via va( and then do SPC m e r (`cider-eval-region`) to evaluate the region. Another way is to go past the ) and do SPC m e e (`cider-eval-last-sexp`)#2018-04-0510:17shan(filter even? (range | 100)) also doesnāt seem to be as nice.
You can do SPC k ( which will insert an sexp before your form = (|)(range 10)
Youād then need to type filter even? => (filter even?|)(range 10)
And then youād need to slurp the sexp in = SPC k s š#2018-04-0609:00prncYeah it's not ideal. I was using the visual selection and eval region trick but feels like a bit of a hack š Anyway thanks @shan.#2018-04-0412:58prncor say I have (filter even?)(range 100) and I slurp with SPC k s I get (filter even?(range 100)) without the space (I would've expected: (filter even? (range 100))#2018-04-0412:59prncsmall things like that, I was just thinking that maybe there is something better than the SPC k lisp state#2018-04-0413:01shanhopefully some veteran spacemac users can answer some of those.#2018-04-0413:02prncthanks @shan! I am sure that there some old vim hands around that successfully transitioned to spacemacs š#2018-04-0413:04shanI remember SPC k s used to put a space but then in a newer version it stopped. Never did investigate though š#2018-04-0413:50andre.stylianosI thought I was imagining things when it stopped doing it#2018-04-0609:02prncI've been doing some research on that and there seems to be plethora of packages that provide some flavour of this functionality e.g. paxedit, paredit, lispy, evil-lispy, lispyville, smartparens, evil-cleverparens so I guess I will review the options and see if there is a unicorn out there š#2018-04-0611:56agigaoHello Clojurians, Iām having hard time running emacs as a server. in .spacemacs server option is t and when I try to use emacsclient -t in terminal, it just open a gui. Any ideas?#2018-04-0614:27pablore@chokheli what os are you using? OSX has some problems running emacs as daemon#2018-04-0617:32agigaoYup, osx. I donāt have a problem with regular emacs-daemon, it works, but not spacemacs-server.#2018-04-0719:33mathpunkI think it would be nice to have a way to configure the clojure layer to use either inf-clojure or cider, with similar keybindings. Is there already a way to do this in the layer? Would it be a relatively simple thing a relative emacs-lisp newb could contribute?#2018-04-1012:24jeff.terrell@mathpunk - I don't think there's a way to do this yet. And I bet it wouldn't be too bad. I'd start by reading the source that was already there for that layer. I bet things will mostly make sense, and it will be fairly clear how to bind to either one depending on a variable.#2018-04-1709:15troglotit~Is there a way to quickly fold all top-level definitions like this:~ got it: zm and zr#2018-04-1812:42Daniel HinesI've been missing this a ton! The best answer I found on so far was, "you don't need it"... :thinking_face:#2018-04-1712:38jeff.terrellOK, I'll tag on to that: anybody know a way to increase or decrease the fold level? I'm in a JS file that just defines a class, and zm closes the class entirely. I'd like to decrease the foldlevel by one such that the class is open but its methods are closed. In vim, zr and zm decrement and increment the foldlevel, and zR and zM have the same behavior as zr and zm in Spacemacs.#2018-04-1717:12aghave you tried different folding method? say origami?#2018-04-1718:24vijaykiranThere is also hs-mode C-c @#2018-04-1719:58jeff.terrell@ag I haven't ever tried origami, although I'm aware of its existence? Do you recommend it?#2018-04-1720:47agit works better with some langs, I think there was an issue in spacemacs repo where someone proposed more "intelligent" way - ability to define modes handled by origami or evil#2018-04-1720:48agI've tried setting dotspacemacs-folding-method to 'origami but I think something didn't work right for me in sass files, I can't recall what was wrong with it. Maybe I'll give another try#2018-04-1720:00jeff.terrell@vijaykiran - What is this C-c @ voodoo? "hideshow" mode, huh? Interesting. Looks like I can get C-c @ C-l to do what I want, if I'm on a line that's inside the class but outside any method. I will keep that in mind, thanks!#2018-04-1722:09ag@jeff.terrell also sometimes you can get more productive if you move away from collapse/expand workflow to "narrow/widen".#2018-04-1722:10agthere's also edit-indirect package that lets you edit regions in an indirect buffer (similar to org-babel source blocks with C-c ').#2018-04-1722:12agthat thing is also cool to edit things like docstrings and comments. In the project I'm currently working we try to add very informative docstrings, with examples and shit. And I sometimes edit them using that package in markdown or org mode.#2018-04-1722:13jeff.terrellI've been narrowing in my org file sometimes, and I like it. I have a harder time imagining how that wouldn't get in my way with source code, but maybe I'll have to try it out and see how it goes.#2018-04-1722:13jeff.terrellInteresting, about edit-indirect. I'll add that to my list of things to look into, thanks!#2018-04-1722:14agyeah, edit-indirect is interesting because when you narrow say on a defn, you can always go back to the main file and check things outside of the scope of than defn. But in that window you can be laser-focused just on that fn#2018-04-1722:17aghere's how you can set it up:
(use-package edit-indirect
:config
(defun ag/edit-indirect-guess-mode (parent-buffer beg end)
(let ((major (with-current-buffer parent-buffer major-mode)))
(cond ((eq major 'clojurescript-mode) (org-mode))
(t (funcall major)))))
(setq edit-indirect-guess-mode-function 'ag/edit-indirect-guess-mode))
throw :ensure t key in there and you can play with it without even restarting Emacs. See in this example, edit-indirect for cljs files will open indirect buffer in org-mode#2018-04-1817:04jeff.terrellI don't understand why this is necessary yet, but I've made a note of it, and I'm hoping to look into edit-indirect more today. Thanks for sharing!#2018-04-1819:17agwhy what's necessary?#2018-04-1819:46jeff.terrellSetting the edit-indirect-guess-mode-function variable.#2018-04-1902:03agif you don't it will open indirect buffer in fundamental mode (If I remember it right)#2018-04-1913:54jeff.terrellI tried this from a source block in an org file (also TIL about , 'āthanks for that incidental tip!). It opened in the same mode as the parent bufferāorg-mode. When I changed the mode of the indirect buffer with SPC SPC emacs-lisp-mode, that changed the parent buffer too. Do you typically have different modes for parent vs. indirect buffers?#2018-04-1914:00jeff.terrellAlso, as I'm thinking about it, I definitely buy the idea that narrowing will help one focus. But why not just narrow in the same buffer, instead of opening up an indirect buffer and narrowing there? I guess, if you can have different modes in each buffer, that seems like a good use case. But I'm struggling to come up with others. What do you think?#2018-04-1917:26agyou can narrow in the same buffer, that's not a problem I do that a lot.
but. When you're workflow is:
- I wanna do edits in this particular function, but I also need to peak into things outside of it#2018-04-1917:26agthen narrowing into an indirect buffer is nice#2018-04-1917:28aganother use case, that I actually use very often:
- I want to edit this docstring, but it's more convenient for me to do this in org-mode
I can of course open scratch buffer, change the mode and then copy and paste it into the main file, but indirect buffer is faster#2018-04-1918:21jeff.terrellGotcha. Thanks for explaining; those use cases make sense. š#2018-04-1918:43agya, indirect buffers are a killing feature of Emacs. In general every other editor/IDE tries to bind things on a file. You have a file and associated environment where your changes are reflected in that file (when you save). Emacs keeps things detached from your filesystem and that's mindblowingly awesome.#2018-04-1918:44agEditing two different functions of the same file and treating them like they live in completely different files is something than no other editor does#2018-04-1803:25quangHey, I'm relatively new to spacemacs, question what does it mean when:
> (that binding is currently shadowed by another mode)
I am editing a coffee-script file so coffee-mode (major) and getting weird indents, (it keeps doubling) and I see this on C-h m
key binding
--- -------
...
RET coffee-newline-and-indent
(that binding is currently shadowed by another mode)
#2018-04-1803:25quangThe indents keeps doubling... so 4, 8, 16, 32 .... the further I nest...#2018-04-1803:29quangmy current theory is, evil-ret is also getting called on RET ? and coffee-newline-and-indent is combining with evil-ret to double the indent spacing?#2018-04-1803:29quangbut I am not sure what a shadowed binding does#2018-04-1803:59quangopened a emacs-overflow for above: https://emacs.stackexchange.com/questions/41072/spacemacs-coffee-mode-indents-keeps-doubling - Thanks if anyone can point me in the right direction. š#2018-04-1817:21jeff.terrell@quang - I can reproduce that behavior. Looks like a bug to me. I don't see any issues (open or closed) about it on the Spacemacs repo on Github. If I were you I'd either ask on the Spacemacs gitter or else open an issue about it. (I also don't know what a shadowed binding is.)#2018-04-2103:39quangthanks Jeff#2018-04-1817:59troglotitToday Iāve tried and switched to origami - not that different for me, because I fold rarely. But the origami-recursively-toggle-node is quite nice. Bound it to TAB in normal-state, so Iām using it like outline-mode.#2018-04-1818:16eggsyntaxFYI, if anyone gets this error during cljs repl start
Exception Failed to launch Figwheel CLJS REPL: nREPL connection found but unable to load piggieback.
This is commonly caused by
A) not providing piggieback as a dependency and/or
B) not adding piggieback middleware into your nrepl middleware chain.
[...]
Note: Cider will inject this config into your project.clj.
This can cause confusion when your are not using Cider. figwheel-sidecar.repl/eval32849/fn--32850 (repl.clj:176)
there's discussion in #cider. piggieback got renamed, and there are inconsistencies about who's referring to what. Folks are in the process of cutting releases of the relevant libs.
I haven't actually gotten a successful cljs startup yet, although at least one other person has. This may be slightly more complicated with Spacemacs since we're not directly specifying a CIDER version -- anyone know if there's a way to do so?#2018-04-1921:47spfeifferI tried TRAMP today for the first timeā¦not quite successful: SPC f f and the "/ssh:/cdn-cgi/l/email-protection" RET resulted in a āfile not foundā error, no sign of ssh anywhere. Any idea on that? Helm should support TRAMP, right?#2018-04-1921:52spfeifferThen i tried c-x d and entered "/ssh:/cdn-cgi/l/email-protection". Now i saw errors in messages buffer. I noticed it is executing a ssh commandline ending in && exit || exit given the output i saw. Problem: I use Win10, installed openSSH, so i have a native ssh binary in my path, works fine in powershell/cmd.exe, but not the commandline i saw in the error message. Does someone know in what shell emacs is executing the ssh command line for TRAMP, and if it can be altered for windows? I only found a solution installing putty and using the plink connection method :white_frowning_face:#2018-04-1921:53spfeifferI would like to use my ssh install that works fine on the CLIā¦#2018-04-1922:42ag@spfeiffer does /sudo:: work?#2018-04-2004:23spfeifferWill try it when i am back in the office, but i doubt it, because i have no āsudoā binary on my windows machineā¦#2018-04-2007:09spfeiffer@ag in Helm, /sudo:: does absolutely nothing. Doing it in dired (`c-x d`) leads to the expected error message env: 'sudo': No such file or directory#2018-04-2007:10spfeifferBut well, i try the plink method that is described for windows. At least a working solution.#2018-04-2007:12spfeifferThanks so far.#2018-04-2007:30aliceJust realized there's a spacemacs specific channel...#2018-04-2011:00vijaykiran@alice I donāt see the same behaviour - what variables did you set in your config ?#2018-04-2011:18aliceI enabled fancified symbols and align-forms-automatically#2018-04-2011:18aliceOnly changes I've made#2018-04-2110:22joshkhi'm attempting to switch from cursive to spacemacs + cider. i'm very used always being in "edit mode" and having quick-hit structural editing features, such as CMD + SHIFT + ( to automatically wrap a structure, CMD + ' to raise, etc. maybe i'm misreading the docs (i'm an emacs newcomer), but it looks like all of the structural editing commands require stepping out of edit mode. is that true?#2018-04-2306:47practicalli-johnny@joshkh lisp-mode is the default structural editing tool in Spacemacs. If you want to learn how to use Spacemacs the Vim way, then I recommend learning to use SPC k .
You can call lisp-mode commands (essentially smartparens) from any editing mode using M-m k.
If you want to use Spacemacs the Emacs way (only in edit mode). You could add Emacs style keybindings for smartparens (or paredit, which is included in the Clojure layer). I did this initially, then found lisp-mode was more productive for me.#2018-04-2309:32AleksanderIs there any way to make Emacs/Spacemacs window on Mac listen to window managers like Magnet?#2018-04-2317:13agI have no idea what Magnet is, but you can make Emacs do pretty much anything you want it to do by directly calling emacsclient with specific parameters#2018-04-2317:14agpass -e (my-function) and it will evaluate it#2018-04-2319:35rymndhngis magnet a good window manager?#2018-04-2403:49fedreg@UA2R84M28 Emacs works perfectly with Spectacle, another window manager#2018-04-2409:14Aleksander@U5J5ME2NQ trying it now!#2018-04-2411:33Aleksanderworked! brilliant!#2018-04-2410:50Bravihi everyone. whenever i use , t a (run all tests) in spacemacs, most times it doesnāt ārefreshā the code. meaning it canāt resolve the newly added functions for example and then I have to quit and re-`jack-in` cider again. is there a work around to fix this?#2018-04-2412:30jeff.terrell@bravilogy - I think there's a "refresh" function bound somewhere under ,, either in clojure-mode or cider-mode. You could try that before , t a to see if it picks up your newly added functions etc. I'm just guessing here, though, because I haven't used , t a before.#2018-04-2412:31BraviI sort of solved it by re-evaluating the buffer every time and + Iāve set it to automatically run tests whenever a namespace is loaded, which re-runs tests every time I re-evaluate the code#2018-04-2412:32BraviI guess it explicitly needs that re-evaluation#2018-04-2412:35jeff.terrellCool, glad you figured it out!#2018-04-2412:35Bravihah cheers š , t a is actually quite convenient#2018-04-2412:36Braviand then you can use , T t to toggle auto test mode#2018-04-2412:36Braviafter which you can just , e b and it will automatically run tests every time#2018-04-2413:10jeff.terrellThat's really nice. I'll have to try that out the next time. I'm used to doing lein test-refresh for autotesting. One of these days I need to just read the cider manual; I feel like I'm missing out on lots of good stuff.#2018-04-2416:58agI wish cider-test- functions had Clojurescript support. I mean I wish in general CIDER had better support of Cljs#2018-04-2718:23clojerAny ideas?#2018-04-2719:49agprobably nee to ask in #cider#2018-05-0607:05fedregAnyone know of a cheatsheet for org mode commands with spacemacs bindings??#2018-05-0712:28pablore@fedreg you could take screenshots from here: http://spacemacs.org/layers/+emacs/org/README.html#2018-05-0715:31fedregThanks! Exactly what I needed. I didn't even bother to check the docs first.... š. Appreciate the help!#2018-05-0712:30pabloreAlso hitting SPC m on a .org buffer should open all the commands available#2018-05-0717:21Drew Verleewhere in my .spacemacs file (assuming thats the right place) would a call to the use-package macro go? and why? thanks in advance~#2018-05-0717:39Drew Verleehmm iām guessing use-package is already installed in spacemacs? iām guessing it provides the package install function im so fond of.#2018-05-0717:43Drew VerleeIām somewhat amused that this tool on literate programming https://github.com/stardiviner/ob-clojure-literate is oddly confusing to install for someone that doesnāt have all the context it seems to assume around you knowing how to install things -_-#2018-05-0717:44Drew VerleeLike, i assume iām supposed to copy that .el file somewhere into my .emacs.d directory#2018-05-0717:46agIf you just want to include a single package you can use dotspacemacs-additional-packages#2018-05-0717:47agwith Spacemacs you don't need to copy anything almost ever into your .emacs.d#2018-05-0717:52Drew Verlee@ag where does `dotspacemacs-additional-packages pull from? Does it grab files from things hosted on the elpa repo?
That El file above isn't hosted anywhere but github that I can see#2018-05-0717:54agyou can do something like this:
dotspacemacs-additional-packages '((cider :location (recipe :fetcher github
:repo "clojure-emacs/cider"
:commit "8a9eab32646abcaaf31fe83b2d897c01971b98f1"))
#2018-05-0717:55agreplace things for values relevant and voila#2018-05-0717:55Drew Verleegotcha! that makes sense.#2018-05-0717:56agI believe you can omit :commit key - it would then pull latest from master#2018-05-0717:56Drew VerleeYea. The important thing is that it can pull from github if i tell it to. Which makes sense, just not in the first couple examples i saw.#2018-05-0717:58agI bet you end up building your own Clojure layer sooner or later, so probably it's the best to add this to the layer, take a look at example here: https://github.com/agzam/dot-spacemacs/tree/master/layers/ag-clojure#2018-05-0717:58agalthough I'm not sure if that package belongs to a custom clojure or custom org layer#2018-05-0717:58aganyway I have both.#2018-05-0717:59agso you can see that it's possible to have Spacemacs layers that depend on other layers#2018-05-0813:12reefersleepDoes anyone know where to find documentation on using visual block selection with spacemacs/evil/emacs? Thereās something called evil-lisp-state-visual-block under SPC k C-v, but I donāt know how to use it, or if it can do what I want/need.#2018-05-0813:18troglotitI think thatās just a side-effecting artifact of merge of two different keymaps - evil-normal-state and evil-lisp-state. You can use VISUAL BLOCK without lisp-state using C-S-v/`C-v` in normal state#2018-05-0813:26reefersleepCheers @troglotit, that works as expected! I was surprised not to see it on the SPC M-x search list, thatās how I usually find functionality by name.#2018-05-0813:27reefersleep(maybe it has some obscure name?)#2018-05-0813:27reefersleepsorry, Iām a moron, itās right there.#2018-05-0813:27reefersleepš#2018-05-0813:27troglotit~Iād find it like ~ oh yeah, itās when you know the keybindings š
#2018-05-0813:28reefersleepthatās handy, too!#2018-05-1210:02Braviis it possible to manually set a namespace of the project? whenever I create a new file, it creates a wrong namespace automatically and I have to change it all the time..#2018-05-1214:34jeff.terrellThat might be a question for #cider. (Is it cider that has this functionality or clojure-mode? I'm not sure.)#2018-05-1417:44agbtw, if you guys are using exwm, I started section for Spacemacs users in the wiki https://github.com/ch11ng/exwm/wiki/Notes-to-Spacemacs-users
if you are on Linux and haven't yet tried EXWM- I highly recommend it, it's "dreams come true" - Emacs becomes your OS#2018-05-1417:55agif you're avid Emacs user and debating either you should switch to Linux - AMA. I can rant for hours about merits and drawbacks and why I couldn't make Linux PC my main machine for so long and kept Mac as my primary workhorse.#2018-05-1418:02jeff.terrellNice! I think this is the WM that I remember Phil Hagelberg (technomancy; creator of Leiningen) talking about on Mastodon. I do want to give it a shot.#2018-05-1418:03jeff.terrellI bounce back and forth between macOS and Linux (sometimes FreeBSD) a fair bit. Seems like I've spent a couple years here, a couple there for the past decade+.#2018-05-1418:03jeff.terrellI settled on Fluxbox years ago, but I want to use i3wm and exwm enough to really grok them.#2018-05-1418:14agWell, here it comes then. My main gripe about tiling window managers and Linux in general that most of them don't allow you to set complex keybindings. Even simplest thing like rebinding Ctrl+Tab|Ctrl+Shift+Tab in Chrome to Super+H/L is extremely non trivial thing. I was really surprised to find out that there's no equivalent to Hammerspoon or even Karabiner in Linux. You can do some crazy things, but they are not simple.
People would argue "well this is not something that WM should be doing anyway" - in that case WM as a thing that lets you have splits and move windows around is kinda useless for me. You can read Xah Lee's post why he thinks window managers suck. http://xahlee.info/linux/why_tiling_window_manager_sucks.html (I don't necessarily agree with everything he says, but he's got the point)
What I really wanted is to be able to use keycords and modality and stay in home row. I want to press C-c C-x whatever-key and have an app send signal to my coffeemaker and show me the status of that coffee in a vertical split or whatever.
And I wanted to switch tabs in my browser by pressing Super+h/l. No other window manager (except maybe StumpWM) lets you do that.
I think I finally found my zen. I'm crazy about Emacs for many reasons, it would be pointless to preach to the choir here. But now I know that:
- Emacs works much better in Linux
- Things are way faster than in OSX
- with EXWM I can simulate whatever keystrokes I like
- every appp is just another buffer in Emacs
I still have to figure out a few things to make it my main machine, but my days using OSX as my main machine I think coming to the end#2018-05-1418:17jeff.terrellThat's awesome. And also the punchline of an old joke: emacs isn't an editor, it's an operating system with a decent editor built in. simple_smile#2018-05-1418:18agnow Jeff, can you imagine being able to edit things in Slack App and any tab in your browser by pressing C-c ' - just like for source-blocks in Org mode?#2018-05-1418:18jeff.terrellI have a pipe dream of having super be used exclusively for window-management commands, and for all window-management commands, so that there's a nice separation between WM-level keyboard shortcuts and app-level keyboard shortcuts. So far nothing I've seen values this separation, but sounds like it'd be possible in EXWM.#2018-05-1418:19jeff.terrellMeaning it sends whatever text is in the current buffer to your editor? Is that what you mean?#2018-05-1418:23agso here's what I mean:
- you want to post something to Stackoverflow
- you go to SO, while cursor in editarea
- you press C-c '
- EXWM opens a vertical split next to your browser window
- you can edit everything and all the tools - syntax checker, abbrevs, thesaurus, etc. are at your disposal
- you press C-c C-c and now that content goes back to your browser
Seamlessly. You feel like you never left Emacs.#2018-05-1418:27jeff.terrellHmm, very interesting. There's a lot of stuff in the emacs ecosystem, that you've probably already gotten configured for editing use. Why not use the same seamlessly from other apps. I like the idea there.#2018-05-1418:27jeff.terrellI'm guessing the new window opened in a vertical split looks like emacs?#2018-05-1418:28ag> I'm guessing the new window opened in a vertical split looks like emacs
what do you mean?#2018-05-1418:30jeff.terrellI mean, the new window that opens when you press C-c C-' is an emacs window (frame), right?#2018-05-1418:32jeff.terrellI don't see anything but your Slack window in that screenshot.#2018-05-1418:33agdon't you see animated gif?#2018-05-1418:33jeff.terrellAh, I turned off animations, sorryā¦opening externally.#2018-05-1418:35jeff.terrellNice. š I've seen that kind of thing before as a browser extension, but yeah, having it globally would be nice for sure.#2018-05-1418:35agyes, I have it for OSX, but it could be so much nicer in EXWM#2018-05-1418:36agthat, among a few other things I need to figure out and voila - I can probably ditch my Mac (if my employer would let me)#2018-05-1418:55agoh.. wow... I just noticed - everything I posted before that gif has disappeared from Slack Android app... Slack seems to be having serious reliability issues#2018-05-1418:59ag@U056QFNM5 do you have Slack mobile app? Can you check please? Seems Slack on my phone thinks we never had that conversation#2018-05-1419:00jeff.terrellI don't have the Android app, but on iOS it looks like I'd expect, with all the recent history.#2018-05-1419:05agoh wow... I had to delete all the app's data (not just cache) and then the content came back, but I had to resign to all my workspaces.#2018-05-1419:17agand now I don't see the latest message I sent to you, I said "thanks for checking this out for me"#2018-05-1419:42jeff.terrellComputers, man. ĀÆ\(ć)/ĀÆ#2018-05-1418:56vuuvi@ag do you use the pomodoro technique?#2018-05-1418:56agyes I do...#2018-05-1418:56aghttps://twitter.com/iLemming/status/971896796992729089#2018-05-1519:59xlevusHas anybody written/found a guide along the lines of "writing clojure in spacemacs" ?
I feel like there's probably a lot of stuff I'm not doing, or stuff I've misconfigured.#2018-05-1520:15agI think @jr0cket has done some excellent work on that, there's definitely a youtube video and blogposts#2018-05-1521:20spfeifferThere is a partially done github hosted ebook by @jr0cket which gives excellent pointers and hints.#2018-05-1521:34spfeifferhttps://github.com/practicalli/spacemacs-gitbook#2018-05-1620:19xlevuspro#2018-05-1811:57spfeifferHow do you do project wide search-and-replace? I found different ways, and all are not working (well): I did SPC / with my search term, get the results in helm buffer. Then c-c c-e is supposed to open the result in an editable buffer, but i get "c-c c-e is undefined". I also tried c-z in the Helm buffer which gives me a menu with F-key assignments, and F4 is supposed to be named "Edit in buffer", but it is not, F4 does an open file in other window. F3 is named āCopy to bufferā, but that is read-only and the wrong thing, i think. Then there is SPC p % which works, but when i am asked to confirm the first replace and i want to replace all occurences with Ā“!Ā“, i get some cryptic "out of range" error. The only thing that worked was confirming every single occurance.#2018-05-1811:58spfeifferNow my colleagues with other editors are laughing at me and i am deeply depressed :white_frowning_face:#2018-05-1811:59spfeifferUsing dev branch (0.300)#2018-05-1812:00troglotitIāve updated just right now and everything works (it worked before too)#2018-05-1812:00troglotitmaybe youāve forgotten to update packages?#2018-05-1812:02spfeifferWhat works? c-c c-e in helm buffer?#2018-05-1812:03troglotitthat and SPC p %#2018-05-1812:04spfeifferOK thanks.#2018-05-1812:04spfeifferYou are right in that i did not update recently.#2018-05-1812:05spfeifferShould have tried that.#2018-05-1812:30spfeifferNope. Newest dev branch, all packages updated: SPC / <search term> gives me results, then c-c c-e gives me "c-c c-e is undefined"#2018-05-1812:33spfeifferThe helm help c-c ? also does not list c-c c-e in its key mapā¦#2018-05-1812:37spfeifferRegarding SPC p % i did it wrong: Y does the global replacement, not !. That was my fault. So SPC p % works fine.#2018-05-1822:32theeternalpulse@spfeiffer tried projectile replace?#2018-05-1822:32theeternalpulseSPC p P by default for me projectile-replace is the command#2018-05-2411:43spfeifferIf someone tries this: For me it is bound to SPC p R#2018-05-2411:43spfeifferAnd works great!#2018-05-2421:49theeternalpulseI'm sorry, I meant that. the typo escaped me#2018-05-2421:50theeternalpulseglad it works. I also use SPC f S to save all the changes. I tend to use magit to review them if it's available as well#2018-05-2504:12spfeifferš#2018-05-1822:33theeternalpulseit's a bit basic, and you'd have to :wa after but I find it the safest to do a project wide search and replace#2018-05-1906:39spfeifferNo, will look at that, thank you. :wa should be the same as SPC f S, right?#2018-05-1923:03theeternalpulseyes. I have since switched to that since the whole fd SPC f s/S is pretty tedious and I fumble it often.#2018-05-2508:28Bravihas anyone ever experienced this?
1. Unhandled java.io.FileNotFoundException
Could not locate figwheel_sidecar/repl_api__init.class or
figwheel_sidecar/repl_api.clj on classpath. Please check that namespaces with
dashes use underscores in the Clojure file name.
#2018-05-2508:31Bravinvm, looks like I was just missing the dependency#2018-05-2610:31kurt-o-sysI'm using spacemacs org mode with source code blocks. All seems to work fine, except source code blocks of clojurescript: only the first line is evaluated, not the rest.
When starting clojurescript jack-in, a clj repl and cljs repl are started as expected.
1. evaluating multiline clojure works fine (all the results are shown in the #+RESULTS block)
2. evaluating a single line cljs works fine as well (the result is shown in the #+RESULTS block)
3. evaluating multiline cljs - only the result of the first line is shown)
Anyone any idea what the problem could be?#2018-05-2612:13kurt-o-sys#+BEGIN_SRC clojure :results value
4544
\a
"a"
#+END_SRC
#+RESULTS:
: 4544
any idea why only the first line is evaluated?#2018-05-2612:14kurt-o-sys(when using the cljs connection - clj works fine)#2018-05-2612:37orestisWhen in Evil mode, using cider-eval-last-sexp is problematic ā I always have to move my cursor to the right of the sexp (by adding an extra piece of whitespace). Is there a fix for that?#2018-05-2613:35troglotitevil-move-beyond-eol is a variable defined in āevil-vars.elā.
Its value is t
Original value was nil
Documentation:
Whether the cursor is allowed to move past the last character of a line.
You can customize this variable.#2018-05-2613:36troglotitthatās the variable which will help with moving eol when hitting $#2018-05-2613:53orestisThanks! That did it š#2018-05-2710:33practicalli-johnnyI changed to moving the cursor to the next line, then evaluating. I typically have at least one blank line between forms.
I also use , e f more often to evaluate without going to end of lie or , e ; to evaluate and return answer as comment.#2018-05-2619:14pabloreSo this morning, after updating, spacemacs is getting this error:
Warning (initialization): An error occurred while loading ā/home/mago/.emacs.d/init.elā:
error: Unable to activate package āclojure-cheatsheetā.
Required package ācider-0.9.0ā is unavailable
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the ā--debug-initā option to view a complete error backtrace.
#2018-05-2710:38practicalli-johnny@pablore
cider 0.9.0 is quite an old version, several years old, so it just may not be available anymore.
Did you update both Spacemacs and the packages?
Are you on the master or development branch?
Is Clojure-cheetsheet a package in the Clojure layer or one you explicitly added in your .spacemacs configuration?#2018-05-3015:12BraviI have flycheck enabled in my spacemacs and in js, whenever eslint detects an error somewhere, it highlights that bit in red. but to actually see the error message, I need to rollover onto it#2018-05-3015:12Braviand I was wondering if itās possible to show the message at the bottom instead somehow?#2018-05-3016:09jeff.terrellYes, try SPC e l @bravilogy. It's not everything I'd want in terms of UX, but at least it lets me keep my hand off the mouse.#2018-05-3017:31Bravithank you#2018-05-3017:34Bravithe tooltip isnt working properly and i had to disable it. ive got 2 screens and my primary screen was my macbook's one. and I had spacemacs open full screen on a 27" external monitor. and the tooltip was showing up on my default screen haha. so basically to view an error tooltip I had to look at other screen and find oddly placed tooltip somewhere in the middle of the screen#2018-05-3017:46jeff.terrellI know exactly the behavior you're describingāI have the same setup and the same behavior. simple_smile#2018-05-3106:29naomarikawhile back (maybe 3-5 months ago) I was complaining spacemacs is flickering in windows when scrolling and someone else had same issue. now itās non existent and I didnāt change anything. anyone observe something similar?#2018-05-3106:51spfeifferFunny enough, yesterdas at work i briefly had the same impression, but was too distracted to recheck. Thanks for the reminder, i will observe that more closely.#2018-05-3107:20naomarikalso wanted to say if youāre using windows, starting emacs with exported display from WSL to mobaxterm is perfect. it runs better than my installation on osx#2018-05-3116:18practicalli-johnnyThanks for the suggestion of mobaxterm. I have been using other X11 servers for windows, however, they would not resize the emacs window. mobaxterm looks very promising.#2018-05-3108:54spfeifferOuch, i think that is way too ācreativeā for meā¦Up to now i am quite happy with the emaxw64 binary build. 26.0.90 up to now, but i want to upgrade to 26.1 now.#2018-05-3108:55spfeifferBut thanks for the hint.#2018-05-3109:36Braviis project-wide search SPC /? when I do that, I get an error
Candidates function helm-ag--do-ag-candidate-process should run a process
#2018-05-3109:49n2oi always use SPC s g p to grep projectwide#2018-05-3109:50Aleksander@bravilogy do you have any of the cli searchers installed? like ag?#2018-05-3109:51Braviyeah and actually after a restart it fixed itself. I think thereās something else messing up this process, because it happened yesterday as well. now another issue I have is that itās taking too long to search for things and can I add node_modules and other stuff to .agignore?#2018-05-3109:59Bravi@n2o pretty sure SPC / is the same as SPC s g p#2018-05-3110:06n2ogreat, learned something again š#2018-05-3110:07BraviI canāt get it to ignore file š#2018-05-3110:07Braviit searches through node_modules and takes about 40 seconds to find what I need š#2018-05-3110:14Braviok I installed the_silver_searcher and it works fine now#2018-05-3110:41n2o@bravilogy i added (setq projectile-use-git-grep 1) to my config file, which causes projectile grep to ignore all files listed in gitignore.#2018-05-3112:03spfeifferYes, SPC / is the project search and works fine for me with ag#2018-05-3112:50spfeiffer@naomarik I just tested scrolling on my private win 10 notebook: Still very choppy scrolling. I will check at my job notebook.#2018-05-3113:11naomarikiām using emacs version 27.0.50 btw#2018-05-3113:15naomarikmight have been a new windows update that fixed it, because i remember it being intolerable#2018-05-3114:17eggsyntax(repost from #emacs)
For quite a while, I've ben using @timothypratleyās method ( https://timothypratley.blogspot.com/2014/08/clojure-friendly-word-definitions-in.html ) for having emacs treat hyphenated words as single words (for purposes of eg forward-word). At some point in the past year, that stopped working reliably for me -- typically navigation by word will treat the first hyphen in a word as equivalent to a space, and the rest as part of the word.
Has anyone else run across this issue? If so, have you been able to figure it out? I've made a number of attempts to track it down, so far without any success. describe-syntax does show hyphen as a word char, as it should.#2018-06-0106:16spfeiffer@naomarik You got a source for a 27 windows binary build?#2018-06-0107:40naomarik@spfeiffer I guess I got it here: https://alpha.gnu.org/gnu/emacs/pretest/windows/emacs-27/#2018-06-0116:02spfeiffer@naomarik Tested scrolling on my work notebook: Scrolling improved. But same versions as at home? Strangeā¦#2018-06-0216:05practicalli-johnny@spfeiffer I believe Spacemacs recommends switching off Smooth Scrolling when using Window (although I cant find where I read that, sorry)
Also, it may sound like its avoiding the issue, but jumping around in Spacemacs is usually more effective that scrolling (once you get used to it)#2018-06-0216:10spfeifferI know my vi movement skills still leave much to desire āŗļø. And both installations do not have 100% the same config, so the cause may be in there. But thanks for the pointerā¦#2018-06-0218:25mathpunkI'm interested in writing up docs for the "Up and running with deps.edn" for CIDER/Spacemacs Clojure mode. There's no quick start here: https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/clojure#quick-start-with-boot#2018-06-0218:25mathpunkAnd the CIDER quick start here does not detect my deps.edn: https://github.com/clojure-emacs/cider/blob/master/doc/up_and_running.md#launch-an-nrepl-server-and-client-from-emacs#2018-06-0218:26mathpunkI got the impression I was to
1. put a deps.edn file in my project root,
2. cider-jack-in
3. require and go
Instead I get "Are you sure you want to jack in without a Clojure project?" and no dependencies available. What did I miss?#2018-06-0220:28orestisOld version of cider? I remember doing that just fine some weeks ago...#2018-06-0310:28Braviis there a way to open up a file from helm in a vertical split? I know C-c o but that opens it up in a horizontal one#2018-06-0316:38mathpunk@orestis Well this is odd.... when I look in the package-list, I see cider-decompile, cider-hydra, and cider-theme, but no cider#2018-06-0316:39mathpunkI'm using whatever the Spacemacs Clojure layer installs, I haven't messed with anything else#2018-06-0316:40mathpunkthat layer hasn't been updated in a while--- is it pinned to the latest CIDER? did you have to make a change yourself?#2018-06-0607:19practicalli-johnnyIf you are not getting the latest Cider, it may be because you are on the stable (master) branch of Spacemacs, which is pinned to the stable only packages of Ella. The development branch is stable to use and has regular updates.
Recommend you use Spacemacs develop branch (run git checkout develop in your .emacs.d directory. Then update Spacemacs (git pull origin develop --rebase true). Then check for updates to your .spacemacs file (SPC f e D). Then update the packages (link on the Spacemacs home buffer SPC b h).
Recommend you restart Emacs after all that (SPC q r).
Hope that helps#2018-06-0316:41mathpunk(I'm checking by running package-list-packages, it's the first stackoverflow suggestion I got for checking package versions)#2018-06-0318:17orestisI think I had to recently explicitly update the packages, and I saw the 0.17 being brought in.#2018-06-0408:59Bravidoes anyone know what could be causing this error?
Symbol's function definition is void: prettier-eslint
#2018-06-0409:02BraviI installed this package from github like so
dotspacemacs-additional-packages '((prettier-eslint :location
(recipe :fetcher github :repo "evindor/prettier-eslint-emacs"))
)
#2018-06-0415:20Bravifound a funny issue when defining a macro. if you type word format, it gets outputted as foormat#2018-06-0415:21Bravii.e.
qq i format ESC q @q
#2018-06-0416:38jeff.terrell@bravilogy - I don't see that behavior. Maybe the mode you're in is doing funny things? Or maybe some abbreviation you have defined? That's funny.#2018-06-0416:39BraviI tried text mode, js mode and react mode. so strange..#2018-06-0509:12Bravi@jeff.terrell ok I did a few more tests and I managed to narrow it down quite a bit. itās happening whenever thereās a blank indentation in front of it. so for example, if my cursor is here
|
and if I do qq i fo ESC q @q
it will read fofoo
but if there are no blank spaces in front of it, so if my cursor is here
|
then it works fine#2018-06-0509:12BraviIām wondering if thereās something in my config thatās making this happen#2018-06-0509:39Braviconfirmed itās happening on other machines as well#2018-06-0509:39Braviwith a fresh install of spacemacs#2018-06-0511:02Timo Freibergwith a default .spacemacs as well?#2018-06-0511:55Braviyeah. I tried it on a machine that had never had spacemacs on it#2018-06-0512:01Braviitās not happening in a new empty buffer. nor in .txt files#2018-06-0512:29jeff.terrell@bravilogy - Nice triage. Yep, I can reproduce. Looks like a legit (and fascinating!) bug. O SPC ESC qq i fo ESC q @q yields a line with ffooo. Nice find!#2018-06-0512:30Bravioh thanks for that! š I thought I was going mental haha#2018-06-0512:31jeff.terrellLooks like this might not even be related to evil-mode: O SPC ESC <F3> i fo ESC <F4> <F4> does the same thing.#2018-06-0512:34BraviI tried it emacs way as well - C-x ( I believe#2018-06-0512:34Braviand itās the same thing#2018-06-0512:34Bravinot sure if behind the scenes they do the same thing but#2018-06-0512:34jeff.terrellIn fact, you can reproduce this entirely within insert mode. O <F3> fo <F4> <F4> yields fofoo.#2018-06-0512:35jeff.terrellOh OK I thought <F3>/`<F4>` was stock emacs, but I don't know. C-x ( does feel more emacs-y.#2018-06-0512:35BraviI believe there was another combination except fo that Iām trying to remember now#2018-06-0512:35Bravithere was i character in there#2018-06-0512:36Bravibut it was the same thing happening basically#2018-06-0512:36jeff.terrellHave you tried vanilla emacs?#2018-06-0512:36jeff.terrellThis is really pretty interesting. Kudos. simple_smile#2018-06-0512:36BraviI havenāt tried vanilla emacs because I donāt know anything in emacs haha š Iām a hardcore vim user#2018-06-0512:37Bravibut itās not happening in vim for sure#2018-06-0512:37jeff.terrellYeah, I'm not surprised about that. In general I've found vim's macros to be more reliable and robust than those in emacs.#2018-06-0512:37Bravibtw, I didnāt know <F3> and <F4> š#2018-06-0512:38jeff.terrellDo you want to ask people in #emacs?#2018-06-0512:38Braviyeah sure I can do that#2018-06-0513:15BraviI canāt reproduce it in clojure files#2018-06-0513:16BraviIām so eager to find out the issue that I completely forgot my lunch š#2018-06-0513:27jeff.terrellI guess you have a programmer's ability to focus. simple_smile#2018-06-0513:42Bravion an unrelated note to the above bug, is it possible to format my js code based on my eslint configuration file?#2018-06-0513:42Braviif anyone knows..#2018-06-0607:38joshkhhow does one go about using paredit keybindings in edit mode? for instance wrapping an expression in parens? M-( doesn't seem to do the trick.#2018-06-0609:21practicalli-johnny@joshkh Although the paredit package is included in the Clojure layer, the keybindings are not defined. You can use Smartparens (which is maintained, unlike paredit) and use strick mode for the basics of paredit. There are also equivalent smartparens functions to those in paredit, which work for all programming languages.
Suggest you take a look at lisp mode SPC k#2018-06-0609:23practicalli-johnnyLisp mode is specifically for structured editing with a normal state (i.e. not insert state)#2018-06-0609:25practicalli-johnnyIf you just want to wrap in edit mode, then select with C-SPC and move select the region to wrap, then press the opening parens#2018-06-0609:27practicalli-johnnyI am assuming by edit mode you mean vim insert state, although the same select and wrap should also work in Emacs state#2018-06-0611:54joshkhthanks! and yup, i meant insert state (i'm very new to emacs). i found the structural editing functions but dropping in and out of insert mode just to slurp / barf seems like a lot of work. in Cursive i would normally press C+W to expand a selection to surrounding forms, press C+' to raise a form, etc. is there also an equivalent key binding to expand a selection?#2018-06-0611:57joshkhas a complete newbie, what's the best way for me to mentally port my understanding of Cursive's structural editing and keybindings?#2018-06-0609:21practicalli-johnny@joshkh Although the paredit package is included in the Clojure layer, the keybindings are not defined. You can use Smartparens (which is maintained, unlike paredit) and use strick mode for the basics of paredit. There are also equivalent smartparens functions to those in paredit, which work for all programming languages.
Suggest you take a look at lisp mode SPC k#2018-06-0610:33Bravi@jeff.terrell hi again š I was wondering, if you get a chance, could you also drop a quick comment on here please?
https://github.com/syl20bnr/spacemacs/issues/10811#2018-06-0619:59n2oI really laughed when I saw your cursive Reaktion @ag š#2018-06-0620:06agwell they don't have intellij emoji#2018-06-0620:11agCursive is good. Sadly I have to admit I think it's too good. I feel bad we still haven't figured out basic stuff in cider like jumping to definition and find-usages that work reliably and for all: clj | cljs | cljc#2018-06-0620:12agsingle and reliable way to navigate to definitions of functions, keywords or any symbols at all#2018-06-0620:13eggsyntax𤷠on the other hand, SM/emacs/CIDER is about a milion times more customizable, and much lighter-weight. Those both matter to a substantial # of folks, I think. Certainly they do to me. And of course free is always pleasant, although I don't mind paying for good tools (& in fact have bought -- via work -- a Cursive license, which use every once in a while for project-analysis stuff).#2018-06-0620:13n2oM-enter g g works quite well in cider#2018-06-0620:14agnot really. does it work for keywords? does it work reliably in clojurescript files?#2018-06-0620:16agcan it work without repl connection?#2018-06-0620:16agcan you jump to a spec definition?#2018-06-0620:17agcan you jump to a namespace file under cursor?#2018-06-0620:18agyou see? things kinda work. there and there you often get some quirks you have to deal with. But this is basic stuff that a developer needs#2018-06-0620:20n2ookay, haven't tested it on Keywords, usually I jump to fn definitions. Most of my time I am working with cljs and have always a REPL running#2018-06-0620:20spfeiffer@bravilogy I tried to reproduce your issue, but all works as expected. Using emacs 26.1 with spacemacs dev branch.#2018-06-0620:26BraviI will record my screen and post a little gif. it could be something about the lines around it. it is not happening on some lines of code and its happening on others. So later on I will post the gif to show it#2018-06-0620:42spfeifferYes, i believe you, but there must be other influencing factors.#2018-06-0708:59BraviYeah, definitely. And Iām trying to determine what they are. š
Hereās the gif
https://cl.ly/3H0P123N3P1F
And another strange thing about that is - in those macros I didnāt put a new line anywhere and yet it automatically puts a new line. This is the keyboard sequence I used there in both cases:
qq i fo SPC ESC q @q
#2018-06-0620:22agI'm not saying cider is not hands down the best option for programming in Clojure. It's the best. But it has tons of things that need to be improved. Other choices are simply just not as good. And cursiveis getting ton of improvements lately and lots of people switching to it.#2018-06-0620:22agThat makes me sad#2018-06-0620:23agStop leaving Emacs, people!#2018-06-0620:24n2oI am always a bit sad when clj-refactor or so says it only works with clj-files... Have to do it manually then...#2018-06-0620:24eggsyntax^ clj-refactor for cljs is my #1 wish.#2018-06-0620:26agyeah... than #1 reason why I cry sometimes standing in my shower, rocking and sobbing cljs could use some cider love#2018-06-0620:29eggsyntaxI retract that. CIDER debugger for cljs is my #1 wish š#2018-06-0620:29n2ooh jeah, that's right#2018-06-0620:30agwell... can we first fix "jump-to-definition" and "find-usages"?#2018-06-0620:30eggsyntax@ag I'm still using your improved jump-to-def, and have been happy as a clam š#2018-06-0620:32agbut... but it still sucks#2018-06-0702:50callumI'd love a link to that improved jump-to-def... š#2018-06-0705:57agit's included in spacemacs's clojure layer#2018-06-0713:17eggsyntaxOh, I should pull it out of my .spacemacs, then, I don't think I noticed that PR got merged.#2018-06-0709:19Bravithis bug is so annoying! š
https://cl.ly/2c0E023f4230
and the funny thing is - sometimes it doesnāt happen at all#2018-06-0712:11jeff.terrell@bravilogy are you on the master or develop branch of spacemacs? I'm on master, and I noticed that @spfeiffer is on develop, so maybe it's a bug that's been solved in the interim?#2018-06-0712:12BraviI tried develop as well#2018-06-0712:12spfeifferHe wrote master in the ticket.#2018-06-0712:12Braviyeah, in the ticket I wrote master#2018-06-0712:12spfeifferBut yes, i am on develop, windows 10, Emacs 26.1ā¦all those differences.#2018-06-0712:12Bravi@jeff.terrell how about you? were you on master when you could reproduce it?#2018-06-0712:13jeff.terrellYep, I was and am on master.#2018-06-0712:22Bravioh well.. itās very difficult to determine whatās causing it as itās difficult to determine when is it happening exactly š it doesnāt happen always. for example, if i keep recording and then executing that macro over and over again, 90% of times it will happen but then thereās a little chance it doesnāt happen. fo and fi by themselves are nothing special but when using in words like format and find, itās annoying to see foormat and fiind typed after running a macro š
temporary solution for this project at work is to run a macro and then run search and replace throughout the project#2018-06-0712:23Bravito replace those malformed words#2018-06-0712:31jeff.terrellWhoa, are you telling me that it's not deterministic? Like in the exact same context it will sometimes be correct and sometimes wrong? Or could that be because there's something about where the expansion happens that is influencing whether it's correct or wrong?#2018-06-0712:35Braviyeah, itās not deterministic. at first I thought there was something going on with vim registers, because in a few cases I recorded a macro, where I used o to start typing on a new line. and then, a few minutes later I recorded another macro (on the same key - q in this case), but instead of o I used i to start typing on the same line. and when I executed it, it inserted a new line instead#2018-06-0712:35Bravias if it had saved o from the last one#2018-06-0712:40Bravithen I thought - maybe itās because Iām using an external keyboard š but it was the same behaviour on my macbook keyboard too.
I will try to re-install everything - emacs and spacemacs and start from scratch I guess#2018-06-0713:02jeff.terrellYeahā¦that's kinda tedious, but a great way to narrow down the problem, bisecting the packages installed and whatnot. I'd be interested to hear if you narrow it down! That'd be a heck of a bug report. simple_smile#2018-06-0714:37Braviso.. deleted spacemacs, deleted emacs. removed all configs from my machine. installed emacs 26.1, cloned spacemacs to .emacs.d, hit f e d, typed
qq i fo ESC q @q
and the same issue š#2018-06-0714:41BraviIāll switch to develop now and will report back. if itās happening there as well, I just give up š#2018-06-0714:41troglotitwait, I read it yesterday, reproduced it in my machine, but somehow didnāt thought of it as a bug. Today I read it again - reproduced it, and then I got that it is indeed a bug š#2018-06-0714:42troglotitIām on develop btw#2018-06-0714:44Braviok so far so good - itās not happening on develop at the moment, for me. now Iāll start adding packages in, the ones I had before. hereās the list
'(themes-megapack
html
yaml
javascript
react
elm
(clojure :variables
clojure-enable-fancify-symbols t)
;; ----------------------------------------------------------------
;; Example of useful layers you may want to use right away.
;; Uncomment some layer names and press <SPC f e R> (Vim style) or
;; <M-m f e R> (Emacs style) to install them.
;; ----------------------------------------------------------------
helm
auto-completion
;; better-defaults
emacs-lisp
markdown
org
(shell :variables
shell-default-shell 'multi-term
shell-default-height 20
shell-default-position 'bottom)
version-control
mc-column
(git :variables
git-gutter-use-fringe t)
;; syntax highlighting
(syntax-checking :variables
syntax-checking-enable-tooltips nil)
#2018-06-0714:45Bravi@troglotit what version of emacs do you have?#2018-06-0714:45Braviis it 26.* as well?#2018-06-0714:45troglotit25.3.1#2018-06-0714:46troglotitI installed from brew the one with bug-fix for magit performance ~(maybe sth like emacsport)~ emacs-plus#2018-06-0714:47BraviI used brew cask install emacs and it installed 26.1 version#2018-06-0715:01Braviok so as soon as I set dotspacemacs-editing-style to 'vim, the issue comes back#2018-06-0715:01Braviotherwise it works fine#2018-06-0715:02Bravidotspacemacs-editing-style 'nil
works fine#2018-06-0715:08troglotitI think thatās because of fd - which is <escape> used to escape to normal mode#2018-06-0715:12Bravihappens on hybrid as well. doesnāt happen on 'emacs#2018-06-0715:13Bravitime to learn emacs I guess š#2018-06-0715:30jeff.terrell@bravilogy - Like you have a fresh install and .spacemacs file, and that's literally the only change you make to the .spacemacs file for this behavior to start? If so, it might even be a bug in evil-mode, which would be kinda epic. I think you can move your ~/.emacs.d folder elsewhere before you start emacs to just run vanilla emacs. From there, I think M-x package-install will let you install packages like evil.#2018-06-0715:30BraviIāll give it a shot now. and yes, thatās literally the only thing Iām doing#2018-06-0715:31Braviis it called evil?#2018-06-0715:34jeff.terrellYep. That's what gives vim-like editing behavior.#2018-06-0715:35jeff.terrellIf you can't reproduce the bug that way, then I'd start trying to figure out exactly which emacs packages spacemacs installs to support dotspacemacs-editing-style == 'vim.#2018-06-0715:36Braviit canāt find that package. I have a feeling I need to add this bit somewhere
(require 'package)
(add-to-list 'package-archives '("melpa" . ""))
(package-initialize)
#2018-06-0715:37jeff.terrellHmm, maybe so. Or maybe just run M-x package-initialize before you run M-x package-install.#2018-06-0715:37jeff.terrell(It's been a while since I used emacs without spacemacs.)#2018-06-0715:44Braviok I tried evil mode in emacs and it works fine. so it has to be something within spacemacs editing style#2018-06-0715:47jeff.terrellInteresting. Do you have any idea what all evil packages spacemacs installs? I'm pretty sure it's installing more than just evil itself.#2018-06-0715:48Bravinot really but Iām happy to dig deeper š Iāll have another play around later on and see if I can find anything#2018-06-0815:20troglotitDoes anyone use ripgrep? do you have problems grepping for \(when in SPC / (error in process sentinel, Invalid regex)?
Iāve googled a bit and found that indeed something like that happened in rg.el package. Going to research a bit for spc /#2018-06-0815:24jeff.terrellI use pt, for no particular reason, but I haven't noticed that problem with it.#2018-06-0817:34ag@troglotit what exactly is the problem? I'm using "rg" as default search app - it slightly differs in syntax from "ag", but it works fine for me. I often do complex queries like searching for a string in only *.cljs files with added lines above and after the line (-C key)#2018-06-0817:50jeff.terrellWait wait waitā@ag are you saying you can do those kinds of queries from within Spacemacs? I've wanted to do this sort of thing for a while and not known how. Example: exclude results from *.json fixture files. Is that possible?#2018-06-0818:03agyes#2018-06-0818:03aghttps://twitter.com/iLemming/status/979241640769478657?s=19#2018-06-0818:21jeff.terrellIf I type --version after SPC s t p (for the pt-based search I'm used to), I get an error:
> Error running timer: (error "Candidates function āhelm-ag--do-ag-candidate-processā should run a process")#2018-06-0818:21jeff.terrell(1) Strange that the error mentions ag instead of pt.#2018-06-0818:22jeff.terrell(2) I wonder if what you're describing is unique to rg, which I notice isn't one of the built-in tools under the SPC s menu.#2018-06-0818:29agI think (I need to check if that's accurate) it's because for SPC / spacemacs uses helm-ag and helm-ag can use not just ag. Anything you set in dotspacemacs-search-tools as the first thing will be used by default#2018-06-0818:36agyeah basically check man page for your search tool e.g. SPC h m rg - you can use some of the arguments in SPC /#2018-06-0818:52jeff.terrellI get that what you're ultimately doing is including args in the rg shell command rather than just a search string, but I think there might be some more config making that possible. I tried :(setq dotspacemacs-search-tools '("rg")) then SPC / and it immediately tells me let: Wrong type argument: commandp, helm-project-do-rg rather than letting me search helm-style. If I reset the var back to '("pt") it works fine, just without the possibility of intervening arguments.#2018-06-0818:53jeff.terrellI did this after a brew install ripgrep, and rg is a valid shell command now, but maybe I need to restart emacs? That error doesn't seem to indicate that, but who knows.#2018-06-0818:53agJeff, try putting the search term first and the arguments after#2018-06-0818:54jeff.terrellAh, that worked (with pt). Strange, but OK!#2018-06-0818:54eggsyntaxAs another datapoint, for me "rg" was already first in the list. I installed ripgrep, and (`SPC /`) -g*clj foo works for me.#2018-06-0818:54eggsyntaxOh good, it's working, NM š#2018-06-0818:55agyeah, the way how rg works it slightly annoying, it would immediately throw some errors but if you continue typing it will search. Now I think I want to find a way to execute actual search only after pressing RET#2018-06-0821:28troglotit@ag when I grep for something which starts with opening paren, e.g. \(when#2018-06-0821:50ag@troglotit ah yeah... rg uses rust's regexp syntax that I'm too lazy to learn. for those kind of things I still use ag. SPC s a f \(when#2018-06-0822:00agtbh I was absolutely happy with ag. But then spacemacs guys decided to make rg the default. I thought: "oh cool - no one confuses it with my name anymore" and did the switch.#2018-06-0918:53spfeifferAnd i thought THAT's why you called yourself āagā āŗļø#2018-06-0919:59twashingHmm, why doesnāt (global-set-key (kbd "C-/") 'avy-goto-char-2) use that key mapping?#2018-06-0920:00twashingSpacemacs just keeps the old binding.
C-/ runs the command undo-tree-undo (found in undo-tree-map), which is an interactive compiled Lisp function in
'~/.emacs.spacemacs/elpa/undo-tree-0.6.5/undo-tree.el'.
It is bound to C-_, C-/, s-z, <menu-bar> <edit> <undo>, <undo>.
#2018-06-0920:01eggsyntaxHow are you running global-set-key?#2018-06-0920:02twashingJust in an .el file.#2018-06-0920:02twashingpackages.el in my own custom layer.#2018-06-0920:04eggsyntaxAh. There I can't help you; I haven't done custom layers at all. I'd try it in .spacemacs (in dotspacemacs/user-config) and see if that works, and also try doing it at runtime. Just to try to isolate.#2018-06-0920:06twashingYes, exactly. Just evaluating that command at runtime doesnāt work.#2018-06-0920:06eggsyntaxMy guess is that the other binding is getting loaded later than yours is. If the above doesn't work, I'd also try binding it to something different, and/or binding that combo to something else, again just to isolate.
Sorry, I know that's all the obv stuff, I've got no particular insight into why it's not working.#2018-06-0920:06twashingHmm, itās just weird⦠and frustrating.#2018-06-0920:07eggsyntaxOh. OK, if evaling it at runtime doesn't work, that blows my theory. Does it work if you eval (avy-goto-char-2 <SOME-ARGS>) at runtime?#2018-06-0920:08twashingI can certainly run the function. Yep, and that works.#2018-06-0920:08twashingItās the keybinding that doesnāt work.#2018-06-0920:09twashingAnd this doesnāt work either. (global-set-key (kbd "C-_, C-/, s-z") 'avy-goto-char-2)#2018-06-0920:12eggsyntaxI think it has to be if you can call it at runtime, but: is it possible that avy-goto-char-2 isn't (interactive)?#2018-06-0920:12eggsyntaxCan you bind it using define-key or one of the other binding options?#2018-06-0920:13twashingHmm, yeah.#2018-06-0920:13twashingWell my existing kbd works: (global-set-key (kbd "C-c g c") 'avy-goto-char-2)#2018-06-0920:14twashingBut this doesnāt (global-set-key (kbd "C-/") 'avy-goto-char-2)#2018-06-0920:14eggsyntaxWeird. Some limitation on global-set-key? Beats me. Gotta run, good luck!#2018-06-0920:15twashingThank-you brother.#2018-06-1216:03BraviI have now officially deleted VS Code, Sublime and Atom š thanks Spacemacs!#2018-06-1216:51aghahaha... Yes I do remember how I tried to do my work and had to keep several things open all the time: InteliJ, Sublime, Vim and Emacs. Welcome to sanity and the enlightenment/dark side (pick one)#2018-06-1309:24jumarI still use IntelliJ from time to time. It's hard to beat its Java interop features. I wish spacemacs/emacs/cider had a better support for it - at least out-of-the-box navigation/jump to the java sources + docs (works only for JDK classes for me - anything else I have to manually add as :classifier sources to project dependencies.#2018-06-1317:24vuuviyeah itās the kind of experience that java was designed for#2018-06-1316:13troglotitFeedback is welcome to my little PR regarding keybindings: https://github.com/syl20bnr/spacemacs/pull/10871#2018-06-1323:52practicalli-johnny@U15603AQZ Looks a good change to make. Should 'browse namespaces' be singular, I.e. 'browse namespace'?#2018-06-1407:18troglotitYeah, I wasnāt sure about that, but seems like singular makes more sense š#2018-06-1411:11Braviis it possible to locate the project dir inside a defun?
i.e.
(defun dotspacemacs/test-fn ()
"hello"
(interactive)
(let* ((project-dir (locate-dominating-file
(or (buffer-file-name) default-directory)
"src")))
(message "The result is: %s" project-dir)))
I have this function, and I want to run a shell command inside this function, but from the project root directory#2018-06-1411:12BraviI have bound this function to SPC A a. so if I open up a file thatās under src/something/ dir, and if I do SPC A a from there, I want to somehow navigate to the root dir, where src folder is and run a shell command there#2018-06-1411:34Pakthe projectile-run-shell or projectile-run-shell-command-in-root commands maybe?#2018-06-1411:56Bravihmm it says wrong number of arguments#2018-06-1411:56Bravi(defun dotspacemacs/test-fn ()
(interactive)
(let* ((result (projectile-run-shell "pwd")))
(message "The result is: %s" result)))
#2018-06-1411:56BraviI tried both commands#2018-06-1411:57BraviIām trying to find examples of usage#2018-06-1413:38Pakwell, you call it interactively, M-x or <spc<spc> and then the name of the command#2018-06-1716:06Drew VerleeI seem to have both a ~/.spacemacs.d/init.el file and a ~/.spacemacs file that contain the same thing. Iām trying to figure out whyā¦#2018-06-1809:11practicalli-johnnyThe Spacemacs installation will create the .spacemacs configuration file. It shouldnt have created the ~/.spacemacs.d/init.el file, however, that file is an alternative to the .spacemacs file.
You should not need both. I believe that it checks for .spacemacs first.
Unless you add other configurations in ~/.spacemacs.d/, like your own snippets or layers, then you can safely delete.
I have a .spacemacs and a ~/.spacemacs.d/ directory, but not the ~/.spacemacs.d/init.el file. I just have my own snippets in that directory. Hope that helps.#2018-06-1716:07Drew Verleei guess it just looks in both#2018-06-1716:26Drew VerleeIs anyone successfully using babel right now with spacemacs? I just get āevaluation of clojure code block is disabledā. I googled this error and immediately was hit with a like 4 year issue on github. Not comforting. Paging @mathpunk as he seemed to be in the thick of itā¦#2018-06-1716:29mathpunk@drewverlee Nah, I decided that the trouble of keeping tangles straight during refactoring wasn't worth it. These days I create .repl files with lots of comments while I'm experimenting, then I extract reusable code to a .clj file and useful writing to a http://index.org or other prose file#2018-06-1716:31mathpunkI use send-to-repl more or less constantly. I also tried developing a repl-to-test workflow with https://github.com/cognitect-labs/transcriptor and I think there's some nice possibility there#2018-06-1716:34Drew Verlee> I extract reusable code to a .clj file and useful writing to a http://index.org or other prose file
Do you have an example i could glance at?#2018-06-1716:35Drew VerleeThanks btw! i wanted to try out literate programming via babel but it doesnāt seem to be err well supported and iām not sure the idea is universal enough to spend a lot of energy on š#2018-06-1717:48Drew Verleeinstalling new version of emacs on mac. Linkapps doesnāt seem to be available anymore so these instructions need some modification:
The recommended way of installing Emacs on macOS is using homebrew:
$ brew tap d12frosted/emacs-plus
$ brew install emacs-plus
$ brew linkapps emacs-plus
https://github.com/syl20bnr/spacemacs#macos#2018-06-1717:50Drew Verleeln -s /usr/local/opt/emacs-plus/Emacs.app /Applications#2018-06-1808:44Bravi@drewverlee I actually installed it through cask instead#2018-06-1808:45Braviwas a simple one-liner#2018-06-1814:30mathpunk@drewverlee Here: https://github.com/mathpunk/simplexity/tree/master/test/simplexity Work on this library stopped when I got employed but, hopefully you can see the workflow approach through the mess (and the math)#2018-06-1815:56vuuviare there any guides on how to use evil go to definition?#2018-06-1815:57vuuviIāve tried it a few times expecting something like intellijās go to definition feature, but It never opens or changes the buffer, it just takes me to helm where I can navigate to files.#2018-06-1913:42practicalli-johnny@U70KNNNKX In Vim Normal mode, use , g g to jump to a function definition under the cursor.
Or use , g G if you want the function definition to open in another buffer.
Make sure the Clojure REPL is running if you want to jump to definitions (otherwise its only dumb-jump)
The Spacemacs ABC videos walk through the spacemacs menu and may give you a good idea (although a few things may have changed) https://www.youtube.com/playlist?list=PLrJ2YN5y27KLhd3yNs2dR8_inqtEiEweE#2018-06-1914:41vuuviokay thanks for the info @U05254DQM#2018-06-1920:11jumarg d and g D should work too#2018-06-2018:22aganyone else who's unfortunate (just like me) and has to use OSX annoyed by this thing: https://github.com/syl20bnr/spacemacs/issues/10906#2018-06-2018:54agAnother OSX Emacs GUI issue that kinda, sorta mildly annoying: for whatever reason when I switch between fullscreen and windowed mode the gamma changes, ever so slightly but that's frustratingly noticeable. For example on my dark color theme - when I start Emacs it looks a bit lighter (which I presume the default gamut of the theme). Then I switch to fullscreen - it gets slightly brighter. Then I switch to windowed mode - it gets really dark. Whatta hell is happening I don't understand. Anyone else having similar experience?#2018-06-2304:08agigaonope. never experienced something similar.#2018-06-2019:49kirill.salykini cant start repl because lein-exec not in the path#2018-06-2020:54practicalli-johnny@kirill.salykin I am assuming you can run lein repl on the command line. If so, try running emacs from the command line too. This can help emacs pick up leiningen on your path (depending on which operating system you are using)#2018-06-2020:54practicalli-johnnySame thing for platinum searcher, does it work on the command line#2018-06-2019:49kirill.salykinaslo pt (platinum searcher) doesnt work#2018-06-2019:50kirill.salykinI think because PATH issue as well#2018-06-2019:50kirill.salykinemacs 26 spacemacs 0.300#2018-06-2019:52AleksanderI think I needed to to add
(setq explicit-shell-file-name "/bin/bash")
(setq shell-file-name "bash")
to my user-init#2018-06-2019:54Aleksanderin .spacemacs#2018-06-2019:54kirill.salykindidnt help(#2018-06-2021:43ag@kirill.salykin scroll up a bit š I posted link to the issue#2018-06-2022:07agplacing (spacemacs/loadenv) in dotspacemacs/user-config I think worked for me#2018-06-2208:30kirill.salykinnope, didnāt help#2018-06-2208:28kirill.salykinthanks, will try#2018-06-2320:08zlrthi'm trying to cope with cider-error popup behavior better. i'd like the point to not auto-jump to the cider-error buffer. so i set cider-auto-jump-to-error to nil. but it still jumps.#2018-06-2320:11zlrthcan't tell at this point if i should be just trying to fix cider-error's behavior or try something higher level. in fact i dislike the elisp debugger's behavior for the same reasons#2018-06-2514:35practicalli-johnnyI just press q to close the buffer and the popup closes and puts the cursor back#2018-06-2514:38zlrthyeah. even having to do that i find annoying. iād rather have trivial errors like calling (first) with no arguments just show up like logs, rather than move-around all my windows and move my point. iād rather have a designated, fixed error window, like i have for my repl.#2018-06-2614:29Braviis it me or is there a problem with cljr-add-project-dependency ?#2018-06-2807:47jumar@U7ESY38HJ you're not alone - see https://clojurians.slack.com/archives/C099W16KZ/p1529665561000109#2018-06-2808:33Braviand I also found this issue
https://github.com/clojure-emacs/refactor-nrepl/issues/226#2018-06-2810:20jumaryes, that's the one references in the slack thread#2018-06-2811:39Braviah yes my bad. I didnāt follow the link, sorry#2018-06-2614:29Braviit keeps throwing an exception#2018-06-2917:28Bravihi everyone. clojurescript jack-in doesnāt seem to work anymore.
nrepl-send-sync-request: Sync nREPL request timed out (op eval code
hereās a recorded screenshot of how to reproduce it
https://cl.ly/212O1Z2h2h0V#2018-06-2917:56agyeah it seems quite a few issues lately with CIDER, prob. related to changes of how it works with nrepl I hope they get fixed sooner.#2018-06-2919:05practicalli-johnnyOn a positive note for CIDER, I did get my first deps.edn based project running the Clojure REPL It was just as seamless as a Leiningen project from CIDER#2018-06-2919:07agsigh... things on the mac got broken completely now. I just updated things, now I can't jack-in it says: Lisp nesting exceeds 'max-lisp-eval-depth' is this known issue, any quick workarounds?
cider-connect doesn't work either#2018-07-0218:13eggsyntaxI'm holding off a bit on updating packages. I know a colleague of mine encountered similar problems, & was able to sole by rolling back his package update.#2018-07-0221:56agthat issue (from 3 days ago) is fixed though#2018-07-0308:48Bravi@U0G75ARHC is that a recent fix?#2018-06-2919:05practicalli-johnnyOn a positive note for CIDER, I did get my first deps.edn based project running the Clojure REPL It was just as seamless as a Leiningen project from CIDER#2018-06-3012:04lemonsHi. Having some problems with clj-refactor. When using cljr-add-missing-libspec I get an error about missing symbol cider-current-session. It seems this variable was renamed in cider to something else. Should I create an issue in clj-refactor for this? I'm new to emacs and not sure whether this is spacemacs specific#2018-07-0212:43practicalli-johnnyIf you found the error in the Clojure layer code, .emacs.d/layers/+lang/clojure/, then its a Spacemacs bug. If not, then its either a Cider or clj-refactor bug.#2018-07-0213:45practicalli-johnnythere is some discussion about this issue here, it seems to be resolved, so a package update in Spacemacs should fix the problem.
https://github.com/clojure-emacs/clj-refactor.el/issues/420#2018-07-0101:26pabloreany doom-emacs users here?#2018-07-0213:29practicalli-johnnyi have only tried the doom-theme with Spacemacs. Personally I did not see any advantage in using the doom-emacs configuration instead of Spacemacs.#2018-07-0311:01clojerAfter a recent packages update Iām now getting this error: File mode specification error: (wrong-type-argument stringp package-desc) when opening a Clojure file.#2018-07-0311:04andre.stylianosNever seen that, but this might be related:
https://github.com/clojure-emacs/clj-refactor.el/issues/369#2018-07-0311:04andre.stylianosdid you also update emacs?#2018-07-0311:05clojerLatest Emacs but that was well before the packages update.#2018-07-0311:09clojerIt seems to be specific to Clojure files. I just opened a Python and Ruby file where there was no error.#2018-07-0311:10clojerSame error with Clojurescript files.#2018-07-0313:42kirill.salykinHi all,
I am trying to use evil-cleverparens, but looks like it is not available under develop branch#2018-07-0313:42kirill.salykinanyone know anything about it?#2018-07-0420:26practicalli-johnnyjust started using the evil-cleverparens layer
https://practicalli.github.io/spacemacs/install-spacemacs/evil-clojure-editing.html#2018-07-0420:29practicalli-johnnyevil-cleverparens makes sure I dont delete parens when doing dd and other vim stuff...#2018-07-0420:34practicalli-johnnyit also reformats the structure of the code, so if you delete a line in the middle of an expression, and the remaining part of the expression is joined up with the first part.#2018-07-0915:28troglotitHey! Does anyone have specific workarounds for pinning cider version?
I was working on cljs/shadow-cljs project - my emacs/cider worked, but right now I work on clj/lein so it doesnāt work 100%.#2018-07-1000:10callumI fiddled with this for ages, and tried a whole bunch of things from different spacemacs issue threads. Eventually, this is what worked for me in dotspacemacs/init:
;; stable packages
(add-to-list 'configuration-layer-elpa-archives '("melpa-stable" . ""))
(add-to-list 'package-pinned-packages '(cider . "melpa-stable") t)
#2018-07-1000:11callum@U15603AQZ You'll have to delete the existing version installed by spacemacs out of your elpa store first, i think#2018-07-1006:30troglotitand where did you put it? I tried in dotspacemacs/init as it described in that issues thread but it didnāt work#2018-07-1008:37troglotitOh, itās a bit different, it worked when I put it in dotspacemacs/init. Thank you!#2018-07-1101:31callumNice š#2018-07-0915:28Roy TrueloveIf you put the version directly in your profile for lein, will that do it?#2018-07-0915:29troglotityeah, I pinned it there, but I need to pin it in emacs config too#2018-07-0915:30troglotitand as I far as I remember tools.nrepl is not required in new version of cider#2018-07-0915:30troglotitso thereās quite a lot of combinatoric variations of how to make everything work š#2018-07-0915:31troglotitand also, Iām using spacemacs, which has itās own quirks#2018-07-0915:35Roy Truelove> thereās quite a lot of combinatoric variations of how to make everything work
Thatās for sure
Looks like pinning versions in general for Spacemacs might be an outstanding issue https://github.com/syl20bnr/spacemacs/issues/2057#2018-07-0915:39prncHi everyone! How do you guys navigate through *.jars? Say I would like to grep/ack/ag/... the files in the jar from emacs, is there a way š?#2018-07-1010:08practicalli-johnnyDid you try just opening the jar in Emacs. It should let you navigate through the directories and view the files. Not sure about search though.#2018-07-1614:01jumar@U7MHWDLD8 you can try zipgrep. Although it's not the most ergonomic "solution" i'm not aware of anything else. As @U05254DQM mentioned, showing the list of all files in jar is easy - just open the file. Then you can execute eshell and you will end up in you local m2 repo dir where the jar is located.
I typically use it like this:
cider-open-classpath-entry
<jump to the selected jar; e.g. clj-http>
eshell
zipgrep 'GET' clj-http-3.7.0.jar
#2018-07-0915:42Aleksanderunzip it first š#2018-07-0915:42Aleksanderjars are zip files with special structure#2018-07-0915:44prncyeah, that's what I did--new to emacs, clojure etc--I thought maybe there is some other way, what gave false hope I guess was that I could browse through with dired without manual unzip#2018-07-0915:44Aleksanderthere might be ā¦#2018-07-0915:45prncthere always is š thanks anyway!#2018-07-0915:48troglotitThat workaround https://github.com/syl20bnr/spacemacs/issues/2057#issuecomment-137960576 doesnāt work for me š it says that āpackage is unavailableā#2018-07-0916:02prnc@dev964 found this to be quite helpful: https://stackoverflow.com/questions/1431351/how-do-i-uncompress-unzip-within-emacs#1432116 essentially letting dired know that jar is a compressed file and I can then uncompress with Z neat, cheers!#2018-07-0920:13Bravihi everyone. is there a way to clear recent files and projects list in home buffer?#2018-07-1000:43callum@bravilogy delete ~/.emacs.d/.cache/{projectile-bookmarks.eld, recentf}#2018-07-1008:46Bravithank you š and another question - my spacemacs hangs frequently. sometimes it happens every 2 minutes, sometimes it happens in 20 - 30 minutes#2018-07-1008:46Braviand I have to force quit through activity monitor#2018-07-1008:46BraviI was wondering if itās possible to see logs or debug somehow, to see whatās going on#2018-07-1016:50agdoes it stop hanging on C-g?#2018-07-1016:51agif that's the case then maybe you can track what's happening by toggling debug on quit?#2018-07-1019:58PBIs there a way to stop my spacemacs from updating cidr to 0.18.0-SNapshot?#2018-07-1101:32callum@U08UTJ5PB https://clojurians.slack.com/archives/C09C8GRLY/p1531181436000184?thread_ts=1531150110.000306&cid=C09C8GRLY#2018-07-1113:36PBā¤ļø#2018-07-1019:58PBI want to "pin" the version in my additional-packages#2018-07-1021:22PBSo definitely to do with the new packages#2018-07-1021:32spfeifferI guess you can't pin.#2018-07-1021:32spfeiffer#2018-07-1021:32spfeifferWe had that yesterday already, sorryā¦#2018-07-1109:42Bravi@ag no it doesnāt š and the CPU goes to 100% in activity monitor#2018-07-1109:43Braviand my laptop slows down unless I force quit emacs#2018-07-1116:50agI suppose that's on Mac, right?
it happened to me before (on Mac, never in Linux)#2018-07-1116:51agand my guess you don't know how reproduce this, right?#2018-07-1116:51agdoes it have anything to do with ediff?#2018-07-1120:39Braviyes, itās on Mac and I have no idea how to reproduce haha š I tried so many things like removing packages, changing / removing things from my config#2018-07-1120:41Braviby ediff, if you mean magit stuff, I donāt think so. sometimes it even happens when I leave my laptop be for good few minutes#2018-07-1120:41BraviI come back to see it in that state#2018-07-1120:42BraviIāve googled a lot and tried disabling the emacs server (not even sure what that does), changed helm to ivy and a few other things I could find online#2018-07-1202:22aghave you tried running Emacs with -q key ? how did you install Emacs? what is the version?#2018-07-1203:47agI'd recommend using emacs-plus brew tap to install Emacs.#2018-07-1208:38BraviI actually installed it through cask. and the version Iām running is 26.1#2018-07-1208:38Bravias I remember the command was simply brew cask install emacs#2018-07-1208:39Bravithank you btw, for trying to help out š#2018-07-1216:58agno problem. I've been there. I feel your frustration. I used to have issues such that until I learned how to debug them.
a) you need to make sure it's not Emacs build you're using (some people would install --HEAD version)
b) need to make sure it's not *your* configuration changes. Remove everything of your customizations and see if it still faulty, even try emacs with -q key
c) remove all Spacemacs layers, try very minimalistic setup
d) open activity monitor, check what Emacs trying do to when it hangs. Most of the time it's trying to call third-party utility like ag, rg, grep or aspell,
e) run M-x describe-mode, check *all* the minor modes, disable those you suspect, try running things without them. For example if you disable page-bereak-lines-mode, Spacemacs's home buffer would be more responsive, because on Mac rendering line separators is laggy#2018-07-1118:41eggsyntaxQuestion -- I've just switched back to 0.17.0 since the 18 snapshot has been in such intense flux, but now I'm getting
Symbolās function definition is void: cider-current-repl
Anyone else encountered that?#2018-07-1119:14andre.stylianosHi @eggsyntax,
From cider 0.17 to 0.18 snapshot that function changed from cider-current-repl-buffer to cider-current-repl, so I made a PR changing that in spacemacs, since spacemacs by default uses the current cider snapshot.#2018-07-1213:57eggsyntaxSince 18-snapshot is currently undergoing so much churn, it's clear that quite a few people are switching back to 17 for now (me among them) -- ideally it would be nice for your fix to only be applied for cider > 17. I can't take that on right now, unfortunately š
But if you see an easy way to do it, it'd be a really nice addition to your update.#2018-07-1214:29andre.stylianosIt might work if that alias they mentioned in #cider is available for both versions, otherwise I'm not sure how to approach that#2018-07-1214:29andre.stylianosI can take a look, possibly tonight#2018-07-1119:15andre.stylianoshttps://github.com/syl20bnr/spacemacs/pull/10954#2018-07-1119:15eggsyntax@andre.stylianos you rock, thank you!#2018-07-1213:57eggsyntaxSince 18-snapshot is currently undergoing so much churn, it's clear that quite a few people are switching back to 17 for now (me among them) -- ideally it would be nice for your fix to only be applied for cider > 17. I can't take that on right now, unfortunately š
But if you see an easy way to do it, it'd be a really nice addition to your update.#2018-07-1214:30andre.stylianosreplied in the thread āļø#2018-07-1215:23andre.stylianoshttps://github.com/syl20bnr/spacemacs/pull/11024#2018-07-1215:24andre.stylianosCreated a new PR to fix this regression, sorry for the trouble š#2018-07-1215:24eggsyntaxThanks tons, Andre, I really appreciate that! š»#2018-07-1215:24andre.stylianosš»#2018-07-1215:28eggsyntaxCherry-picked into develop already, sweet!#2018-07-1215:29andre.stylianosthat was quick#2018-07-1215:29andre.stylianoswell, hope everything works fine now. I tested here and both 0.17 and 0.18-snapshot were working for me with that change.#2018-07-1215:30eggsyntaxI'll update today & confirm it's working for me as well. Thanks again!#2018-07-1216:01eggsyntaxConfirmed! Working fine š#2018-07-1322:01_rj_r_So I just switched to Spacemacs. I used Emacs for like a week a few years ago, so I am pretty new to the whole Emacs/Spacemacs thing. I have it installed and set up with the clojure layer. However, when it comes to the rest of how to use the editor, I'm pretty lost. Any recommendations/links to good tutorials, things to go through? Trying to get up to speed on Spacemacs as fast as I can so I can get back to learning Clojure š#2018-07-1323:03agtry Spacemacs ABC on youtube. those are quite outdated, but may give you some ideas#2018-07-1410:53spfeifferPerhaps you have a look here, too: https://github.com/practicalli/spacemacs-gitbook#2018-07-1414:49_rj_r_I was looking at that last night. However, I think I am going to go with just Emacs and custom config a few things instead.#2018-07-1521:50aghave you considered trying spacemacs-base?#2018-07-1614:03jumar@UAW40E21F my intro video can be useful for you too: https://curiousprogrammer.net/2017/05/12/clojure-development-workflow-with-spacemacs-and-cider/#2018-07-1523:43Chasei had a similar question to reaper. i'm starting clojure for the brave and true. I have a little bit of experience with Spacemacs. My question is when I do "Cider jack-in" and it starts a repl, how is this different than when I am in a terminal and use "lein repl"? Are they interchangable so if a tutorial is talking about lein repl, can I instead just use Cider and all instructions will work the same?#2018-07-1523:49agThe whole notion of "REPL-driven development" can be extremely confusing for a beginner. I was really surprised to hear all the time "startup time is not a problem", "you don't really need to restart the repl", etc.
Maybe go through @U07FP7QJ0ās excellent guide https://lambdaisland.com/guides/clojure-repls ?#2018-07-1523:49agI hope it doesn't confuse you even more.#2018-07-1523:51Chasethank you! I'm on the multi year stay patient plan just scratching an intellectual itch so it's all good.#2018-07-1523:54agoh, no... the concepts are pretty simple to grasp. it's just hard to jump from "oh I know how to do simple things in REPL" to "I need to build a web-app, with it's own server and websockets, with Figwheel, and clojurescript advanced compilation"#2018-07-1523:56agand if you like the guide and free videos, I can't recommend enough to get to paid content on http://lambdaisland.com. Arne is awesome.#2018-07-1523:57aghe doesn't waste your time with trivial things you can get from readmes. he digs much deeper.#2018-07-1523:59agthe only other person (I know) who creates videos of similar, advanced level is @U054W022G#2018-07-1523:59agtry his Clojure Pills episodes on youtube. They are very educational#2018-07-1600:00Chaseawesome. i'm not ready to commit to something like that yet. i've been super flighty in checking out different languages and such. all the lisp family languages intrigue me so much though so I'm trying to keep it to just fiddling with clojure, racket, and common-lisp now and seeing where it takes me.#2018-07-1600:01Chaseand elisp i guess. I'm worried I'm handicapping myself with spacemacs but it but setting up my own emacs + evil setup seems far more overwhelming than it was setting up my far more minimal vim config.#2018-07-1600:05agI'm a die-hard Vimmer. I spent months and years trying to set my own Emacs config that I would happy with. Over and over I would announce init file bankruptcy and would start everything from scratch. I guess I just lacked the knowledge. Everything seemed to be so... overwhelming. And then I tried Spacemacs. I have discovered so many things. It turned out that the hardest part is simply to know what Emacs can offer and where to start digging when you encounter a problem or want to change something. Spacemacs simply made things more discoverable.#2018-07-1600:07agWith Clojure it's I think similar. The hardest part for me is the core library. Just learning what's in there takes time.#2018-07-1600:09Chasei can empathize with that for sure. I think i would have been on the same path. I would never use something like spacevim over my own simpler vim config that i grasp really well but with emacs it is just different. spacemacs spoiled me to where I was just going to try and create my own version of it on my own with maybe just cutting out all the stuff I won't be using it.#2018-07-1600:10Chasemy concern is i hear it is hard to learn how to add your own config to it. not sure if that is true or if it is just a different approach in configuring spacemacs than vanilla emacs but still possible.#2018-07-1600:11agNo, that's not true. Spacemacs is still as much configurable as vanilla Emacs if not more.#2018-07-1600:11Chasethat is good to hear!#2018-07-1600:12Chasei think it comes down to Spacemacs is emacs. it's all elisp config just the same. I just need to learn it and the spacemacs docs seem well done and the gitter channel is there to help#2018-07-1600:14agI'd suggest try out Spacemacs's default distribution (with batteries included). See what it has to offer. Learn things like Layers and Layouts. Try to create your own custom layers. Whenever something bugs you try to find the way to change it. Use describe- functions. Explore layers included with Spacemacs. Remove packages you don't need by setting dotspacemacs-excluded-packages.#2018-07-1600:17agAnd after a few months if there are still things that you don't like - you can always switch to Spacemacs-base and add layers Ć la carte#2018-07-1600:18Chasedefinitely. i've come to the same conclusion and just decided to embrace it fully and not fight it.#2018-07-1600:18Chasethanks for the chat!#2018-07-1600:20agOf course, my pleasure. You don't have to "embrace it". Emacs lets you do crazy things. It's up to you how crazy you want them to be.#2018-07-1600:21ChaseI'm excited for all this lisp programming fun. i think clojure could be my main general purpose language but also am excited to learn common lisp and enough elisp to be useful. my main concern with clojure is the error messages. i've played with elm and rust and the compiler error messages are so good. i feel it's helping me learn programming but i want to play with more dynamic languages. lisp seems to be the pinnacle of dynamic langs.#2018-07-1600:21Chasebut i don't really have much of an interest in java at all. i hear clojure error messages can be a little java-ish. something about stack traces#2018-07-1600:23agClojure is a hosted language. Scala's error messages for example aren't less hideous. When in Clojurescript repl it shows you javascript error stacktraces. Maybe someday it will be hosted on something other than JVM and JS#2018-07-1600:25agand we would be like "aww... man... these error messages are so nice"#2018-07-1600:32Chasedefinitely. it seems the benefits of being on the jvm far outweigh my error message concerns. every time i see a Clojure talk or project hit something like hacker news it just seems very high quality. i'm excited for it's future. and to be able to go full stack with clojurescript. it's awesome.#2018-07-1600:35Chaselet me ask you one quick repl question and i'll leave you alone and go rtfm. say i'm inputting a multiple line function in the repl. the pareninfer or whatever has already thrown in all my ending parenthesis so when i hit enter it tries to run the function before i've entered the rest of the lines. how do you work around this? do you just delete the ending parenthesis? I hope that wasn't too confusing#2018-07-1600:36agyeah. it ain't a silver bullet though. nothing is. at the end of the day what matters is: "it simply works". I have tried almost every popular way not dealing with javascript. I've tried Babel, Traceur, Coffeescript, Typescript, Livescript, Gorillascript, Fay, Haste, GHCJS. I haven't really tried Elm, Purescript or Reason. Simply because I got "stuck" with Clojurescript. It just works. It makes sense. And until it stops making sense I will happily use rather it than anything else.#2018-07-1600:38agWhen you say "REPL" what exactly do you mean? Repl in Terminal? CIDER-Repl?#2018-07-1600:40Chasemostly cider. when i use a terminal repl it is not automatically closing my parens so it is not a problem there.#2018-07-1600:40agtry rebel-readline it does#2018-07-1600:41agif you have cider jacked in, you don't have to type things into repl. You can evaluate things in a file directly. Or you can open cider-scratch buffer and type things and eval them there#2018-07-1600:43agtry commands like eval-last-sexp or cider-pprint-eval-last-sexp#2018-07-1600:46Chasecool. i will keep playing around with it. i'm not seeing something like eval-current-sexp for like where my cursor currently is. time to do some exploring!#2018-07-1600:47agput your cursor after the last paren in a form (in insert mode), press C-x C-e#2018-07-1600:48agor mark some region then press , e r (eval-region)#2018-07-1600:49agthere are bunch of ways to evaluate things#2018-07-1600:49Chaseit's so cool!#2018-07-1600:49Chasealrighty, i need to head off. thanks again for all your help tonight. it's been fun#2018-07-1602:12_rj_r_So I also just found this... I just started going through it, so not sure how good it will be, but it has been interesting thus far: https://cestlaz.github.io/stories/emacs/
Walks through writing an emacs config file for vanilla emacs. Might be of some use so I figured I'd drop it here š#2018-07-1606:07agThose are good. Some prefer something written instead of videos. For that I can recommend Mike Petersen's blog and the book "Mastering Emacs". Buy it. It's worth every single penny. I bought it twice (forgot that I did buy it once already). Never bothered asking for refund. It was worth it. I can send you a copy (it might be outdated though). I read it when I already learned bunch of things. Still, I found a few gems in there that I didn't know before.#2018-07-1606:17agPeople not familiar with Emacs often question our sanity. "Is it really worth spending that much time learning a frigging editor?". However, I honestly never met anyone who gave Emacs honest, heartfelt try of a few months and ever regretted learning it or thought it was waste of time.
I honestly think - as long the keyboard input stays relevant - Vim and Emacs will never become obsolete. It's hard to predict where technology takes us. But I think probably keyboard input stays. For at least next couple of decades.#2018-07-1715:47rustam.gilaztdinovHow can I show image in repl?#2018-07-1716:27jumar@U0NBJDK4N
It seems that this has been implemented recently: https://github.com/clojure-emacs/cider/issues/1510
Something like this should work:
( "/Users/jumar/awesome.jpg")
#2018-07-1716:33rustam.gilaztdinovyeah, doesnāt work for me, unfortunately#2018-07-1716:34rustam.gilaztdinovM-x cider-repl-toggle-content-types enabled#2018-07-1716:36rustam.gilaztdinovCIDER 0.18.0snapshot#2018-07-1716:42rustam.gilaztdinovOS X and I installed emacs from homebrew, so not building from source with --no-gui or other strange flags#2018-07-1716:54jumarwhat Cider build do you have? It works for me with CIDER 0.18.0snapshot (package: 20180714.811)#2018-07-1716:56rustam.gilaztdinovCIDER 0.18.0snapshot (package: 20180624.2344)#2018-07-1717:01rustam.gilaztdinovhow can I update cider in spacemacs?#2018-07-1806:33jumarI used package-list-packages, search for cider and update manually.#2018-07-1921:06Chaseso say i have my clojure file in a left frame, my repl in the upper right, and then a terminal and a Org mode notes file in the bottom right that I SPC Tab alternate. Is there a way to save that setup so that when I boot up Spacemacs and select my project it opens all those accordingly?#2018-07-1921:08Chasei've seen people able to do something like that using a tiling manager like i3wm, i wonder if emacs has the same capability. i think emacs even has it's own windows manager, right?#2018-07-1921:10eggsyntaxYeah, you can. Hmm, checking...#2018-07-1921:11eggsyntaxThere are different ways to do it IIRC, but I've mainly done it using desktop-save/`desktop-load`.#2018-07-1921:11eggsyntaxhttps://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Emacs-Sessions.html#2018-07-1921:13eggsyntaxYou can have it automatically save when you exit, if that's what you would prefer, by setting (desktop-save-mode 1). Or you can leave that off and just save your preferred setup but load it on startup with (desktop-read) (not desktop-load, sorry typo).#2018-07-1921:13Chaseooh! Nice! I had a hunch it would be possible.#2018-07-1921:14Chasewhere do i put that function/setting? in the spacemacs user-init area? user-config?#2018-07-1921:14eggsyntax& there are various packages with variations. Definitely a there-are-many-ways-to-do-it sort of thing.#2018-07-1921:14eggsyntaxuser-config.#2018-07-1921:18Chasecool. i'll do some exploring. thanks for the direction!#2018-07-1922:55practicalli-johnnyI like the layouts approach to organising buffers for files. You could have a layout for each of the projects you work on regularly
https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#layouts-and-workspaces#2018-07-2013:47eggsyntaxI tried layouts and found it didn't work well for me at the time -- but I didn't have a ton of *macs experience yet, and TBH I forget the details. So I ended up switching to using`desktop`. YMMV š#2018-07-1923:20Chaseok, ok. I like it. I'll check this out. I like that it's spacemacs specific. I've been finding it a little hard constantly translating emacs tutorials to spacemacs commands, etc. all while still trying to up my vim-fu#2018-07-2013:47eggsyntaxI tried layouts and found it didn't work well for me at the time -- but I didn't have a ton of *macs experience yet, and TBH I forget the details. So I ended up switching to using`desktop`. YMMV š#2018-07-2013:35kommendoes cider-find-keyword work for anybody or is it only broken for me?#2018-07-2013:36kommenalways get an helm-M-x: Wrong type argument: stringp, nil#2018-07-2013:38eggsyntaxIt works for me, at least in clj, at least when the cursor is on a keyword whose namespace matches a clojure ns (eg :user/company takes me to the user namespace).#2018-07-2013:39eggsyntaxIf there's not such a match, I get the message "Canāt find namespace āfooā"#2018-07-2013:42kommen@eggsyntax thanks, youāre right, it only works for namespaced keywords and this also works for me#2018-07-2013:43eggsyntaxOffhand it doesn't seem like behavior I'd find useful very often. Was that the behavior you were hoping for, or were you looking for something else?#2018-07-2013:51kommen@eggsyntax it seems pretty useful for example for integrant component symbols, to quickly find there definitions. I guess it is what I was looking for, but for some reason I didnāt try it with a namespaced symbol and was just irritated by the error#2018-07-2015:14jumarWow, didn't know about cider-find-keyword. It seems to be very useful e.g. for finding spec definitions#2018-07-2015:21eggsyntaxThere's also cider-browse-spec for spec in particular.#2018-07-2023:24Chasei was trying to check out the clojure irc channels but now erc won't connect to freenode. I immediately get this error: * Notice -- You need to identify via SASL to use this server
==> ERROR from http://irc.freenode.net: Closing Link: 190.238.237.11 (SASL access
only)
Connection failed! Re-establishing connection...
I'm using the same login info I've always used. It works fine for other servers like mozilla. Any suggestions?#2018-07-2109:10alanforrHello. Iām trying to edit clojure with spacemacs. When spacemacs tried to download the files for Clojure mode I got the error āFile mode specification error: (file-missing Cannot open load file No such file or directory cider-eval-sexp-fu)ā#2018-07-2110:27alanforrI solved the problem by restarting.#2018-07-2120:42Chaseso what is the general consensus on how you enter multi line functions and such into the repl? do you just delete the last closing paren and go about your day or is there a handy quick keyboard command that says "hey, i'm going to press enter now, but don't evaluate yet"#2018-07-2120:43Chasei did just find out about CTR <CR> which will just close all your parens for you before evaluating. that's pretty darn awesome! but i still am too lazy to reach up to delete closing parens if i don't have to.#2018-07-2208:11vxe@chase-lambert definitely look at paredit and then paredit + lispy, else electric-indent-just-newline might be what you want#2018-07-2209:50Pak@chase-lambert, write the multi line function in a separate clojure buffer and evaluate the expression to the repl#2018-07-2219:02eggsyntax@chase-lambert whatās CTR <CR>? A quick attempt at googling got me nowhere.#2018-07-2220:09Timo Freiberg@eggsyntax i assume he meant CTRL instead of CTR, so ctrl+enter, or the control key + enter#2018-07-2221:51Chaseyup. my bad. control plus enter when you are at the end of your expression in the repl will close all the brackets and parens necessary#2018-07-2301:03eggsyntaxOh, of course, makes sense. Didnāt know that though, thatās cool!
Personally I just either write the whole form on one line, or for anything lengthy, I stick it in whatever other clj/s buffer I have open, & then send it over.#2018-07-2317:03Chasesay i find myself liking the other route. exploring and creating functions in the repl. when i have it how i like it what is the easiest route to get that function into my program? i'm not seeing a send-to-buffer command. Will I just have to yank and paste?#2018-07-2318:40eggsyntaxThat's what I always do. Since fns & defs written in the repl often depend on other ones, and you may have gone through multiple iterations of them, I also have a little proof-of-concept lib that (given a var) spits out the most recent versions of your definition of that var, preceded by all dependencies. eg if you've done the following in the repl:
(def x 3)
;; a bunch of other stuff
(def x 5)
;; a bunch of other stuff
(defn f [y] (+ x y))
and you ask it for the construction of f, it'll spit out
((def x 5)
(defn f [y] (+ x y)))
Makes that copy/paste more pleasant.#2018-07-2318:41eggsyntaxUnfortunately def and defn along with the default repl can't support that functionality, so you either have to use the custom repl that comes with the lib, or use the alternate forms of def and defn that come with it.
https://github.com/eggsyntax/reconstructorepl#2018-07-2318:50Chasevery cool. i've bookmarked and will look into adding this to my workflow. right now i'm trying to keep it at spacemacs defaults for just a little bit to get more familiar. if i have lein, boot, and clj, which exactly is my default repl? I'm guessing lein. is that the repl i get when i use cider jack in in spacemacs? it doesn't tell me when i first initialize the repl though. it just says cider.#2018-07-2318:54eggsyntaxOh, it won't work with any of those -- but you can enter the custom inner repl from any of them. & yeah, if it's a lein project, AFAIK the spacemacs repl you get is a lein repl. I'm reasonably confident that's true, because it picks up the stuff in my ~/.lein/profiles.clj.#2018-07-2319:03Chasethat makes sense. i just created that lein profiles file to add ultra. the github made it sound really helpful but i don't think i'm seeing what the screenshots say i should be seeing. but like i said, i need to stay a little focused so trying to learn the defaults more before tweaking too much.#2018-07-2319:05eggsyntaxMakes a lot of sense š . And reconstructorepl in particular has rough edges & is mainly just proof-of-concept -- definitely not one I'd add until you're really familiar w the overall toolchain/workflow. Honestly it just saves a bit of time & hassle, it's not in the least essential š#2018-07-2410:02PakAlso, thereās M-x cider-repl-history, thereās some additional customizations you can do to persist the repl history to file too, although not sure how it works if you have multiple repls open#2018-07-2416:57Josh HorwitzSo Iām really struggling with how to wrangle the parens , mostly when going back in and having to add code, writing brand new code is no problem. Iām not sure what to do#2018-07-2420:25eggsyntax@joshua.d.horwitz @joshua.d.horwitz (?) are you using some flavor of structural editing? It's pretty much the only way to do it -- I almost ever only insert/copy/delete at the sexp level, ensuring that parens stay matched at all time. Happy to help you get started with that if you're not already.#2018-07-2420:36practicalli-johnny@joshua.d.horwitz the deliciously sounding slurp and barf are your friends along with other structural editing tools (as Egg mentioned. There is a secion on Lisp mode in the Spacemacs ABC screencasts that should give you a good start. Go to 10 mins 35 seconds in this video https://www.youtube.com/watch?v=fYsqaAL8HSU&list=PLrJ2YN5y27KLhd3yNs2dR8_inqtEiEweE&index=5#2018-07-2420:39practicalli-johnnyThere is also a keybinding guilde for lisp mode https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#editing-lisp-code#2018-07-2420:41practicalli-johnnyI started working on structural editing in my book, but this section needs a bit of work. A quick glimpse through this section will hopefully give you some ideas https://practicalli.github.io/spacemacs/structured-editing/#2018-07-2423:03Chasethis was something i was really looking for too! thanks folks.#2018-07-2423:04Josh HorwitzThanks all!#2018-07-2423:04Josh HorwitzIāll check that out now#2018-07-2423:09Chasei also had a vim-fu meta kind of question. is that preferred in the vim channel? it's not necessarily about clojure in vim either so i can go to the vim irc or something. basically there is a long, repetitive function in the brave book at: https://www.braveclojure.com/do-things/#The_Shire_s_Next_Top_Model What kind of vim commands would you use to make writing that function out a lot less painful. (obviously i could copy paste but i'm looking for general vim improvement and see many clojure functions that are kind of like this.#2018-07-2508:48AleksanderThere is a #vim channel as well#2018-07-2423:09Chaseright now i just yanked the map of {:name "head" :size 3} and pasted it 18 more times and am manually going to each line, changing the word in quotes using cw, changing the size number using r, going to the next line, hitting enter to move the next copy pasted line to the next line, leaving insert mode to go to the next word in quotes, and repeating the whole thing. how would you do it instead?#2018-07-2500:18practicalli-johnny@chase-lambert I would type {:name āleftā :size 1} as itās the most common pattern. Then copy that into the kill ring. Then type 18 followed by the vim command p and it will paste 18 times. Then just edit the bits that were different using append or cw.
You could use lisp mode to jump to the end of each map, or the any-jump commands under SPC j might be easier to jump to the right places, e.g you could jump to the next number 1 and use r to replace where required.#2018-07-2500:21Chasecool, thanks. seems like i was basically on the right track except could have used more of those shortcuts for the actual navigation. i know i'm just scratching the surface of the editing capabilities in vim/emacs so just wanted to make sure i wasn't missing a super useful navigation shortcut.#2018-07-2508:49Aleksanderyou could record a macro deleting the word in double quotes and the letters#2018-07-2508:49Aleksanderor use a regex for that#2018-07-2511:25Igor GarciaI would start with the simple list of pairs like:
head 3
left-eye 1
left-ear 1
...
Then I would replace (`:%s`) all line starts with {:name ", the spaces with " :size " and the ends with }\n#2018-07-2511:37Igor GarciaI've just tried here. Spaces would mess up if you do the :name first but if you use tabs it will work just fine:
head 3
left-eye 1
left-ear 1
mouth 1
nose 1
neck 2
left-shoulder 3
left-upper-arm 3
chest 10
back 10
left-forearm 3
abdomen 6
left-kidney 1
left-hand 2
left-knee 2
left-thigh 4
left-lower-leg 3
left-achilles 1
left-foot 2
:%s/^/{:name \"/g
:%s/\t/\" :size /g
:%s/\n/}\r/g
#2018-07-2515:26eggsyntaxSo in my user-config I try to bind a key to cider-repl-clear-buffer, but somehow it gets overridden by cider-repl-previous-input. If possible I'd like to stick with that key for consistency with other contexts.
I'm binding it with
(with-eval-after-load 'cider-repl-mode-map
(evil-define-key '(normal insert) cider-repl-mode-map
(kbd (right-mod "k")) 'cider-repl-clear-buffer)
(`right-mod` is a personal one that refers to different keys on linux & mac).
I'm binding plenty of other stuff like this in the same way, but somehow just this one gets overridden. I would think that given the with-eval-after-load, the define-key would be run after cider-repl-previous-input gets defined. BTW I can eval that manually after the repl is already up and running, and it binds just fine at that point. But it's pretty annoying to have to remember to eval it every time, even thought I've wrapped it in a fn to make it easier.
Anyone have any ideas on why this is happening? And/or how to work around it?#2018-07-2616:34Pak@eggsyntax thereās additional code being run in packages.el of the clojure layer, which is probably overriding your code#2018-07-2616:35eggsyntaxHmm. So possibly I need to do it as (with-eval-after-load 'clojure-mode ...)?#2018-07-2616:36eggsyntaxI may not be understanding the full order in which code is running at startup. I thought it was
load libs -> run lib code -> user-config (maybe with other stuff in between, certainly with stuff before & after)#2018-07-2616:41Paknot sure myself, but try it without the with-eval-after-load? the user-config section is executed right at the end of the spacemacs startup ā¦#2018-07-2616:42eggsyntaxWorth a try!#2018-07-2616:46eggsyntaxNah, no such luck.#2018-07-2616:49eggsyntaxNor (with-eval-after-load 'clojure-mode ...)#2018-07-2616:50eggsyntaxThe keymapping which overrides it is defined in cider-repl.el, which is why it seemed like with-eval-after-load 'cider-repl-mode-map would do it.#2018-07-2711:07practicalli-johnny@eggsyntax I've always used hooks to add key mappings or load other things into a layer once its loaded.. Not sure if that makes it any easier. You still need to know the right mode to hook into š
For example, I use the following to set my own tab spacess for editing HTML code
(defun jr0cket-web-mode-indent-hook ()
"Indent settings for languages in Web mode, markup=html, css=css, code=javascript/php/etc."
(setq web-mode-markup-indent-offset 2)
(setq web-mode-css-indent-offset 2)
(setq web-mode-code-indent-offset 2))
(add-hook 'web-mode-hook 'jr0cket-web-mode-indent-hook)
#2018-07-2713:07eggsyntaxAh, yeah, interesting, I've seen hooks but never tried to write any. Cool, I'll give it a shot, thanks @jr0cket!#2018-07-2713:45practicalli-johnny@eggsyntax This example might be more relevant to what you were doing
(add-hook 'cider-repl-mode-hook
'(lambda ()
(define-key cider-repl-mode-map (kbd "<up>") 'cider-repl-previous-input)
(define-key cider-repl-mode-map (kbd "<down>") 'cider-repl-next-input)))
There are many examples of hooks in my dotspacemacs/user-config section of my .spacemacs file. Just search for add-hook
https://gist.github.com/jr0cket/9f170c910491ce01d243ca58d1c07f12#2018-07-2715:27eggsyntaxHey, that works! I guess that runs later than the lib code. Thanks @jr0cket, that's a big help! And actually I've had trouble with up/down for prev/next input, too, so it's a nice bonus that this makes those work too š#2018-07-2716:58practicalli-johnnyHooks run after a layer or mode is loaded into memory, so they should be the last thing to run. So in the previous example, hooks won't load until after the reply mode does.#2018-07-2716:59eggsyntaxPerfect š#2018-07-2716:53eggsyntax~Wow, emacs just managed to crash my whole system (ubuntu 18.04). I'm impressed?~#2018-07-2717:02practicalli-johnnyI've never had a crash of the OS from Spacemacs. I had Emacs hang on a process before, but very rarely. Are you sure it was Emacs?#2018-07-2717:07eggsyntaxNo, I just figured out I was misinterpreting the role of files in /var/crash/. emacs did crash, but it may have been part of the broader system crash.
I'm still learning how to figure out the causes of linux system crashes...#2018-07-2717:08eggsyntaxI retract the above, it was totally wrong AFAICT. I apologize for my libel š#2018-07-2718:03rustam.gilaztdinovguys, can you help with refactror-nrepl? i have this in .lein/profiles.clj
{:user {:plugins [[refactor-nrepl "2.3.1"]
[cider/cider-nrepl "0.17.0-SNAPSHOT" :exclusions [org.clojure/tools.nrepl]]]}}
when run lein repl I always get this:
Error loading refactor-nrepl.middleware: java.io.FileNotFoundException: Could not locate cider/nrepl/middleware/util/misc__init.class or cider/nrepl/middleware/util/misc.clj on classpath., compiling:(refactor_nrepl/middleware.clj:1:1)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.middleware/wrap-refactor in this context, compiling:(/private/var/folders/dd/yjt452yn0zs1hs4_sd077rsm0000gn/T/form-init8768462867645520700.clj:1:8336)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6875)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.analyze(Compiler.java:6625)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3834)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6870)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
...........
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.middleware/wrap-refactor in this context
at clojure.lang.Util.runtimeException(Util.java:221)
at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:710)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6868)
...
#2018-07-2718:49eggsyntax@rustam.gilaztdinov for current versions of spacemacs & cider, you shouldn't need to put either of those in your profiles; they should both be automatically loaded by CIDER. At least that's my understanding, and I don't have either of them in my profiles.
There are def old tutorials floating around that tell you to add those, but to the best of my understanding they're outdated.#2018-07-2718:49eggsyntaxHmm, although you may need [cider/cider-nrepl "0.17.0"] in your project's project.clj.#2018-07-2718:50eggsyntax(in which case having it in your profiles instead should also work fine. So...I retract that part, but I think you def don't need to explicitly specify refactor-nrepl anywhere).#2018-07-2718:53rustam.gilaztdinovhmm, so I should add
:profiles {:dev {:dependencies [[cider/cider-nrepl "0.17.0"]]
:plugins [[refactor-nrepl "2.3.1"]]
in project.clj ?#2018-07-2718:54rustam.gilaztdinovthis doesn't help(#2018-07-2718:54rustam.gilaztdinovmay you share your env for work with refactor?#2018-07-2718:57eggsyntaxI don't have refactor-nrepl anywhere in my ~/.lein/profiles.clj or my project's project.clj.
I have cider-nrepl in my project's project.clj.#2018-07-2719:36practicalli-johnnyThe CIDER docs recommend you define cider-nrepl as a plugin rather than a dependency in your project.clj
:plugins [[cider/cider-nrepl "0.17.0"]]
By adding cider-nrepl as a dependency then that library will be included in the jar or uberjar you create when deploying. Not a big issue, but its more classes to load when your application first runs.#2018-07-2718:58eggsyntax(as a dependency, not a plugin).#2018-07-2718:58eggsyntaxHere, I'll post both (but they're very, very messy š ):#2018-07-2718:59eggsyntaxI'll PM them since I can't put a snippet in a thread.#2018-07-2719:28practicalli-johnny@rustam.gilaztdinov if you use cider-jack-in from Spacemace then you can simply remove the ~/.lein/profiles.clj file, it is not needed.
If you use cider-connect instead, then you will need a profiles file as defined in https://cider.readthedocs.io/en/latest/installation/#setting-up-a-standalone-repl#2018-07-2719:29practicalli-johnnyFor Leiningen, the ~/.lein/profies.clj would just contain {:repl {:plugins [[cider/cider-nrepl "0.17.0"]]}}#2018-07-2816:15Chasesometimes when i'm browsing lisp stuff i see mention of parinfer and paredit. i'm having a hard time figuring out if spacemacs is using any of these for their clojure layer and/or lisp state. the doc rabbit hole led me to evil-lisp-state using smartparens. Is this the spacemacs equivalent of parinfer/paredit? Or do people still add those tools to their workflow on top of what default spacemacs provides?#2018-07-2816:17Chaseactually just remembered a helpful source that was given to me earlier: https://practicalli.github.io/spacemacs/structured-editing/ Seems smartparens is our version of those other tools. carry on, folks!#2018-07-2907:20practicalli-johnny@U9J50BY4C Glad you found this helpful, I will do some more work on it today. In summary, smartparens is the default package that supports all languages in Spacemacs. So as well as all lisp languages, it also support closing & matching for things like tags in HTML.
Paredit was the original structural editing mode just for lisps, however, it is not actively maintained. The Clojure layer does actually include paredit, however no keybindings are defined, so you either have to use commands via SPC SPC or add your own keybindings to dotspacemacs/user-config, preferably using hooks on the Clojure mode.
Parinfer is relatively new and self describes as a bit of an experiment. It does provide a bit more indentation automation which for some is great and for others quite confusing or annoying.
https://shaunlebron.github.io/parinfer/#2018-07-2900:02Chasesay i want to just write "in" or something else in the repl and then hit enter to evaluate. Well autocomplete is trying to give me all kinds of options but i don't want any of them. i just want to evaluate "in" or whatever it is. how can i tell it to leave me alone and let me just hit enter. i don't want to hit space. i don't know if it is ocd but i hate having a space between the last expression and the closing parens#2018-07-2907:40practicalli-johnny@U9J50BY4C not sure if this answers your question, but here goes...
To close the autocomplete pop up, you can press ESC or fd.
If in is a symbol, I.e. something defined with def the you can evaluate it without wrapping in (). āinā should be selectable in the autocomplete list once itās def expression has been evaluated.
If you are evaluating a function, a defn, then once you have evaluated that function in the current REPL, it will automatically appear in the autocomplete pop up too (in the REPL buffer and Clojure file buffer). If you are evaluating a function in the REPL buffer, then first type ( and smartparens will type the closing ) for you, so you can then start typing the name of the function and hit ENTER to select the full name when itās at the top of the autocomplete pop up list.
If you are evaluating code in the Clojure file buffer, then you either jump to the end of a function, or an empty line below and hit , e e which evaluates the previous expression. Or use , e f with your cursor somewhere inside the current expression. I also like using , e ; which adds a comment with the result of evaluating the expression.
Hope that helps#2018-07-2900:18Chaseactually my control-enter tip (to auto-insert all needed ending parens before evaluation) that I mentioned a few days ago will work fine for this. sorry to come here before fully thinking out the problem. sometimes though, i think it's the act of writing out my problem here that makes me think of the answer. not sure if i should delete the messages#2018-07-3001:02Chasei'm playing around with the Learn Reagent tutorial just for fun and it uses shadow-cljs but I don't seem to have this command: M-x cider-create-sibling-cljs-repl Any advice on how to get that going? I'm trying to use the instructions provided here:https://shadow-cljs.github.io/docs/UsersGuide.html#_launch_the_clojurescript_repl#2018-07-3016:37practicalli-johnny@U9J50BY4C the M-x cider-create-sibling-cljs-repl is my Spacemacs setup which is running CIDER 18-snapshot, specifically
.emacs.d/elpa/25.3/develop/cider-20180509.109/#2018-07-3016:38practicalli-johnnyI use the develop branch of Spacemacs, which will pick up the latest snapshots of Cider and other packages when I do an Update Packages from the Spacemacs home page.
If you are using Spacemacs develop then run Update Packages and you should have that command#2018-07-3016:39practicalli-johnnyIf you are using the master branch of Spacemacs, the default, you may only have earlier (stable) versions of Cider. If you are not sure which Spacemacs branch you are using, then
cd ~/.emacs.d/
git branch
#2018-07-3016:49Chasethanks for the info! I'm on the default but am not opposed to the develop branch at all as long as it's reasonably stable to learn clojure with. i'll go find out how to switch to the develop branch now!#2018-07-3016:51Chasegit checkout -b develop origin/develop
I guess this is all i need to do so that is great.#2018-07-3017:21pabloresadly the stable branch of spacemacs is very outdated in many packages#2018-07-3017:22pablorebut develop version is stable enough#2018-07-3018:03agI can attest to that: I've been using Spacemacs' develop branch for over 3 years now. Number of times something broke to the point that i had to spend more than 15 minutes to fix it? Exactly four.
Ironically things get fixed faster on develop#2018-07-3019:18Chasethat is good to hear. it's funny though i'm having a couple issues already. SPC f t to bring up neotree is very glitchy, sometimes splitting my main window. And there is a package ac-ispell that it can't find but it tries to load every time i open emacs. and i still don't have that cider-create-sibling-cljs-repl.#2018-07-3019:18Chasedo you think i should move down to stable emacs 25? I'm on emacs 26 right now.#2018-07-3019:40Chasehmmm. i did however have a cider-connect-sibling-cljs and that worked even though i don't know how i created it in the first place. and neotree is working fine now! thanks folks.#2018-07-3019:40Chasethe 30 sec start time because it's looking for that ac-ispell package is still annoying though.#2018-07-3019:49agI generally, would suggest not using Neotree. IMO It's way too buggy and unpredictable. Have you considered Treemacs instead? I personally use direx.#2018-07-3019:53Chasei'll look into those options. i have basic vim text manipulation skills but not much else in terms of workflow and such in vim, emacs, emacs+evil, spacemacs, cider...lol#2018-07-3019:59agif you get over the basics (buffers vs tabs), fear of having to write elisp, etc. very quickly you find that Emacs can Vim better than Vim. In addition to that it lets you do quite mindblowing things.#2018-07-3020:04Chaseoh yeah, i'm sold on emacs+evil for sure. spacemacs seems great but quite heavy coming from vim. but i can't imagine i'll be able to roll my own config of emacs+evil seamlessly linked to clojure(script)/cider any better (and with this kind of ui). and i can play with org mode and magit too. doing all that on my own seems daunting.#2018-07-3020:09agTake things Ć la carte. Of course it would feel like insurmountable mountain. Don't rush. If you started using Org-mode, just start writing down every single problem you encounter. Slowly you will fix many of them, and some of them may not even need fixing.#2018-07-3020:16Chasedefinitely. i enjoyed setting up my vimrc but it was minimal. with emacs+evil, i think i would basically want it to be like spacemacs anyways. the documentation is good too and you folks and the gitter are super helpful. i've read of veteran emacs users fed up with maintaining their huge configs and preferring spacemacs to that anyways.#2018-07-3020:17Chaseplus i need to focus on writing and learning software development! i lose focus on that sometimes playing with my tooling#2018-07-3020:20aginvesting in tooling never felt so good and practical. Because I'm sure 10-15 years from now things I improve in my workflow say regarding org-mode. I'm pretty confident that some of it still will be relevant#2018-07-3020:21agbesides at some point you realize, when you have to do something, it's so easy to write a function. e.g. I realized that very often when I type a ticket number, I really like to have it as a url. It took me literally 10 minutes to write a function for that#2018-07-3020:22Chaseand what keeps you on spacemacs vs rolling your own config?#2018-07-3020:23agit just works for me now. besides, it is largely my "own config". It consists of my customized Spacemacs layers#2018-07-3020:24agFor many months I have tried building my own evil based config. A few times I've announced .init file bankruptcy and have started over.#2018-07-3020:24agthen I found Spacemacs.#2018-07-3020:25agI learned a lot more stuff about Emacs. Spacemacs sped up my progress#2018-07-3020:25agat this point I do feel very comfortable - If I ever have to roll my own config, I can do it. But Spacemacs works for me and makes sense for me. Until it stopes making sense... I will use it#2018-07-3020:28Chasemakes sense to me. when i was researching it seemed people thought it was too hard to make their own customization on top of spacemacs but i'm suspecting that might be a little overstated.#2018-07-3020:45agit is absolutely wrong assessment. Spacemacs feels big for a reason. It's opinionated and bloated, yes. But nothing stopping anyone from removing things they don't want. Spacemacs doesn't make Emacs less customizable.#2018-07-3115:23practicalli-johnny@U9J50BY4C for a vim driven file explorer, i use ranger. its lightweight and has file previews
https://practicalli.github.io/spacemacs/working-with-projects/ranger.html#2018-07-3022:06Mario C.Hello all!#2018-07-3022:06Mario C.How do I switch between a window to the neotree?#2018-07-3022:19rustam.gilaztdinovspace 0 for tree, space 1 to window#2018-07-3022:20rustam.gilaztdinovOr maybe space 2 or 3, depends on how much windows you have#2018-07-3022:21rustam.gilaztdinovAlso, in tree you can type ? and see hints to work with it#2018-07-3104:51Mario C.Thanks!#2018-07-3022:06Mario C.I just started using spacemacs recently#2018-07-3023:35ag@mario.cordova.862 I don't recommend using neotree... try treemacs or direx. more time you waste trying to tame neotree - the more it frustrates you#2018-07-3023:37eggsyntax@ag what would be a reason to choose one of those two over the other? Iām up for trying one, but possibly not both. Or if you donāt feel like doing the full explanation, just tell me which one you like better š#2018-07-3023:39agI personally use Direx (that one I discovered before Treemacs). It is a simple tree, with output similar to the command line tool with the same name.#2018-07-3023:40agTreemacs is nice, much nicer than neotree#2018-07-3023:41agjust include treemacs layer to dotspacemacs-configuration-layers#2018-07-3023:41eggsyntaxAnd it looks like treemacs-evil if youāre the evil sort? Or is that automatic w the spacemacs layer?#2018-07-3023:42agjust include the layer#2018-07-3023:42eggsyntaxCool, thanks! Iāll make the switch this evening & see how it goes š#2018-07-3023:43eggsyntax@mario.cordova.862 in my experience itās usually the best bet to just do whatever @ag recommends š#2018-07-3023:44agfirst thing you'd probably would like to change is the icon-sizes in treemacs. You can use M-x treemacs-resize-icons#2018-07-3023:46agGuess I'm using both now š#2018-07-3023:47agI like direx, because it is clean and it doesn't "pretend" to be a special buffer#2018-07-3023:48agextending it super-easy#2018-07-3023:48agwho needs icons? what is it... some sort of VSCode or something?#2018-07-3023:50eggsyntaxHere's an extremely terse summary of the treemacs advantages over neotree for anyone else who's interested:
https://www.reddit.com/r/emacs/comments/7249jt/comment/dnfqtj1#2018-07-3100:31ChaseTreemacs looks cool so far. Lol on the icons, I was like, ahhh cool little icons and then saw your post.
are you folks getting this error on startup: --> installing package: /cdn-cgi/l/email-protection [1/1]
Package ac-ispell is unavailable. Is the package name misspelled?
How would I find out what layer is trying to add this or go about getting this fixed?#2018-07-3100:34agac-ispell comes in auto-completion layer#2018-07-3100:35agit might be broken... simply put in in dotspacemacs-excluded-packages#2018-07-3100:36agthat's usually the easiest workaround for faulty packages#2018-07-3100:39Chasethat worked! easy peasy. and whoa! develop branch loads over twice as fast for me.#2018-07-3100:42agI'd recommend purging .cache in ~/.emacs.d (whenever you update version of Emacs or switch branches). Simply do git clean -xfd, first run it with -n key. It will do a dry run. To make sure that you're not deleting something important#2018-07-3100:43Chaseok. this was a clean install straight into develop mode though#2018-07-3100:43agoh, then you're good#2018-07-3104:54Mario C.haha thanks! Ill look into it! @ag @eggsyntax#2018-07-3115:46Mario C.Question: From neotree how can I open a file in a new window?#2018-07-3117:14Chasehttps://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#opening-files-with-neotree This might help ya. It shows commands for split windows too if that is what you are asking. If you open one file and want to go back to the buffer you were just in before opening that file you would hit SPC TAB#2018-07-3119:15eggsyntaxI'm definitely liking treemacs more than neotree so far (but have spent a grand total of maybe 15 minutes using it -- I mostly tend to do SPC p h for helm-projectile to fuzzy search in-project files. But the learning curve on treemacs seems to be trivial, so it's worth it even if you don't use file trees much...#2018-08-0116:18Timo Freibergif anyone has any questions or feedback about treemacs - the author is a coworker of mine#2018-08-0117:32Mario C.When I am viewing a file in a window I can type / which allows me to search. Lets says I do /FOO what do I press to scroll through all the matches?#2018-08-0117:32Mario C.Sorry for such a basic question#2018-08-0117:37eggsyntax@mario.cordova.862 if I'm understanding you correctly (searching entirely within a regular buffer), you hit enter once you have it the way you want, and then n will jump forward to the next match.#2018-08-0117:38eggsyntaxN will go to the previous match.#2018-08-0117:38Mario C.:thumbsup:#2018-08-0117:38Mario C.Thank you!#2018-08-0117:39eggsyntaxNP! @mario.cordova.862 are all the matches in the buffer highlighted? I forget if that's turned on by default. If not, I recommend it š#2018-08-0117:41Mario C.Yea they all get highlighted#2018-08-0118:47Chasethis little cheat sheet might help you Mario: https://gist.github.com/robphoenix/9e4db767ab5c912fb558 The search you are doing with / is actually a vim thing. This cheat sheet includes spacemacs stuff and some vim stuff. I also recommend going through the evil tutor. Press SPC h T to get to it.#2018-08-0209:12dumratHi, I'm new to spacemacs and cider. Have a week or so of free time so wanted to give it a go.
I'm specifically looking for correct set up instructions for testing. Is there any resource which properly documents how to structure tests folder, run all tests, auto load tests, etc?
Right now, if I do SPC m t n from my source file, I get this error: No test namespace: prm.model.core-test. I can't get it to work. Attaching screenshot of my structure.#2018-08-0209:20shanit could be the extra test you have in the middle of prm.model.test.core-test#2018-08-0209:21shanI think you should have test/clj/prm/model/core-test.clj#2018-08-0209:25dumratThanks! This was generated by luminus hmm#2018-08-0209:40shanah ok, must need some extra set up in spacemacs then#2018-08-0209:52shanso the problem is SPC m t n uses
https://github.com/clojure-emacs/cider/blob/master/cider-test.el#L602
to infer the test ns, which defaults to the same ns but with the -test added to the end of the ns.
Looks like you can define a custom function but Iām not sure how youād do it#2018-08-0214:06eggsyntaxI frequently do SPC / to do a fuzzy search for text across the project. Sometimes it would be really useful for the output to be sorted. Anyone have any hints on how I might accomplish that? I tried
(defun helm-project-search-sorted (&optional default-inputp)
(interactive)
(sort
(spacemacs/helm-project-smart-do-search)
'<))
But the results end up not being sorted -- or to be more specific, sections of the results appear to be sorted, but the whole is not. I'm guessing this is because ripgrep is farming out the search to multiple threads, and my fn isn't smart enough to put those together properly before sorting.
Any tips would be appreciated! My emacs lisp skills aren't very strong.#2018-08-0216:18Mario C.Does anyone know how to make the mini buffer window larger?#2018-08-0216:18Mario C.Its so small. Like 3 row height#2018-08-0216:28shanlooks like max-mini-window-height might be what youāre after#2018-08-0216:34Mario C.Where would I add that to?#2018-08-0216:35Mario C.Because I did which-key-side-window and nothing seemed to happen#2018-08-0216:49shanif you do SPC h d v and search for max-mini-window-height, you should be able to set the value#2018-08-0216:50shanactually this might be what you want then:
https://emacs.stackexchange.com/questions/26311/how-to-increase-height-of-minibuffer-mini-window-in-spacemacs#2018-08-0216:50Mario C.I did that and did not notice any effects#2018-08-0216:50Mario C.But I am thinking its because that is the 'grow height'#2018-08-0216:50Mario C.I want a default height#2018-08-0216:51Mario C.Like when I hit SPC I want a good sized window to pop up. Not a window that can grow to my max height, if that makes sense#2018-08-0216:57agwhat you're talking about is which-key buffer.#2018-08-0217:01Mario C.lol okay so I am stuck in this custom buffer. The easy customization buffer#2018-08-0217:01Mario C.how do I kill it or get rid of it#2018-08-0217:02agSPC b d#2018-08-0217:03agyou might be in non-evil mode, you can change that by C-z#2018-08-0217:04Mario C.Im inside a buffer and I can't get to the regular mini buffer that would allow me to do SPC b d#2018-08-0217:05agpress C-z, cursor color should change, then you'd be able to do SPC etc etc#2018-08-0217:06Mario C.There we go!#2018-08-0217:06Mario C.Thanks#2018-08-0217:07Mario C.I kept thinking SHIFT-C Z š
#2018-08-0217:11agwhen you don't have evil enabled you can also press whatever key is set in dotspacemacs-emacs-leader-key#2018-08-0217:11agby default it's set to M-m#2018-08-0217:12agmeaning M-m does the same thing as SPC in evil#2018-08-0217:01agyou can set which-key-side-window-max-height, the max amount is 1, I don't know if that's enough#2018-08-0218:40Mario C.Thanks @ag. Do you know how to work with magit in spacemacs?#2018-08-0218:41agI feel like I do#2018-08-0218:41Mario C.Sorry its just that switching over to spacemacs feels like learning how to walk all over again#2018-08-0218:42Mario C.anyways, after executing the command SPC-g-s#2018-08-0218:42Mario C.I get the a status page. How can I undo changes that have not yet been committed?#2018-08-0218:49Mario C.Okay so after entering SPC-g-s. I can enter SHIFT-? which pops up the menu#2018-08-0218:49Mario C.After that it is pretty straightforward#2018-08-0219:03agMagit is huge.. It will take you some time to master it. I've been thinking about recording a video on sorta "advanced" tricks, but swamped with much stuff at work#2018-08-0220:46Mario C.Ah I didn't mean it like that. Just meant that getting rid of changes was pretty straight forward from that point on#2018-08-0220:49Mario C.Also when I hit ctrl-l (control el) in the eshell#2018-08-0220:49Mario C.the shell screen clears but it doesn't scroll to top#2018-08-0220:59agthe function you need is afaik is (eshell/clear-scrollback)#2018-08-0220:59agsee if C-l bounds to something like that#2018-08-0222:45Mario C.I started a REPL in Cursive which provides me with a host ip and a port number. CIDER allows me to connect to it. So far so good. In the Cursive side I loaded up a file and switched to its namespace. But in CIDER when I call those functions that were loaded in (via cursive) it yells and says "no such function".#2018-08-0300:11practicalli-johnnyIāve never even considered running a REPL in one editor and connecting to that REPL in another editor. You could try looking up if nrepl broadcasts all changes to all connections to a REPL.
I am curious to know what benefit you get from running two editors attactched to one REPL. Are you just comparing the different experiences.#2018-08-0305:54Mario C.Very good question. The reason I did that earlier was because I was having issues starting up CIDER from spacemacs. And I just wanted to get a REPL up and running. So I figured as a workaround for the moment I could start a REPL session via Cursive and then connect to it from spacemacs.#2018-08-0222:45Mario C.Is this expected? Or is it an error on my part? what gives?#2018-08-0301:19dumratIn spacemacs, how do I run cljs tests? I am using chestnut template. When I do SPC m t n from a cljs file (which has corresponding test file), I see error : user-error: Clojure-only operation requested in a ClojureScript buffer#2018-08-0302:14agso do you have a Cljs repl?#2018-08-0303:12aghttps://twitter.com/iLemming/status/1022639619190345728?s=19
imma just gonna drop this here#2018-08-0304:03dumrat@ag: Yes, I do#2018-08-0305:26dumratAnything special I have to do to get both a clj repl and a cljs repl running at same time?
Currently, I do this:
1. Start a clj repl : SPC m '
2. Run a server on repl.
Everything is fine at this moment. I can eval, refactor.
3. Run a clj repl: SPC m '
4. (use 'figwheel-sidecar.repl-api)
5. (start-figwheel!)
6. (cljs-repl)
Now, if I move to a .clj file, I see that cider is not connected.
How to get two clj and cljs repls running side by side?
Any links are welcome. Thanks.#2018-08-0318:30Mario C.I have a dumb question. Lets say I have two windows open (3 if you include NeoTree) and I want to swap window positions, AKA have window 2 be where window 1 is and window 1 where window 2 is. Is there a command for this?#2018-08-0319:41eggsyntax@mario.cordova.862 yeah, for me, it's eg SPC w H -- all the evil-window-move- fns in that menu. It's not phrased in terms of a swap, but it works that way.#2018-08-0320:21Mario C.@eggsyntax The shifts focus but doesn't move the window#2018-08-0320:21Mario C.There is only evil-window-move-far-left & evil-window-move-far-right#2018-08-0320:22eggsyntaxAre you sure you're using capital H? That should move the window.#2018-08-0320:22eggsyntax& yeah, those are the fn names, plus top/bottom ones.#2018-08-0320:22eggsyntaxDoesn't fully replace a generalized swap if you use more than a few windows in one frame, but I typically max out at 4.#2018-08-0320:24Mario C.I just did spc w K because I had horizontally split windows and it did this weird thing where it opened up a new window with NeoTree#2018-08-0320:25eggsyntaxHuh. Odd. If you ever get a weird thing like that, you can always undo it with winner-undo (one of my favorite features. Of course there should be a separate undo stack for UI changes!)#2018-08-0320:26Mario C.Okay so I went back to this config NeoTree | File A | File B#2018-08-0320:26Mario C.That represents my view if that makes sense#2018-08-0320:27Mario C.To swap windows from B -> A#2018-08-0320:27eggsyntaxI think so? That's three windows, in that order?#2018-08-0320:27Mario C.SPC w H#2018-08-0320:27Mario C.Yes#2018-08-0320:27eggsyntaxBut NeoTree window handling is its own thing AFAIK. I wouldn't expect it to respond normally to swapping windows around. It tries to keep itself as a special window, window 0.#2018-08-0320:30Mario C.Ahh I see. So maybe thats why funky things happen when I do those commands#2018-08-0421:54pauldseems that spacemacs develop clojure layer has broken. see #cider for some reports if anyone else is having a problem#2018-08-0615:32Mario C.I started a CIDER session and it said that a connection has been established. But when I run SPC m s s I get a message that says No cljs REPL in current session#2018-08-0615:34Mario C.Okay after switching buffer to a clj file instead, it opens the repl buffer just fine.#2018-08-0615:36Mario C.Where do I define Clojure, CIDER's version? In the .lein/profiles.clj?#2018-08-0615:37Mario C.I get these warnings in the REPL#2018-08-0616:08eggsyntax"Clojure, CIDER's version?" -- do you mean "what version of Clojure is used by CIDER"? AFAIK, there shouldn't be any need to specify that.
When you say, "I started a CIDER session", what specific command did you run?#2018-08-0623:02Mario C.@eggsyntax I meant to say where do I define the clojure and cider versions#2018-08-0623:03Mario C.Cider sessions => SPC m s i#2018-08-0700:02stbgzhey all I am seeing this error while starting up cider Caused by: java.lang.RuntimeException: Unable to resolve var: cemerick.piggieback/wrap-cljs-repl in this context
at clojure.lang.Util.runtimeException(Util.java:221)
at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:720)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
#2018-08-0700:02stbgzI am using a new leing template with reaget. Has anyone seen tis error before?#2018-08-0700:12eggsyntax@mario.cordova.862 Clojureās version is typically specified in your project.clj. For CIDER itās more complicated, but could you clarify why you need to specify it?
SPC m s i runs cider-jack-in. If you also want a ClojureScript REPL, you should do SPC m s I, ie cider-jack-in-clojurescript.#2018-08-0715:04Mario C.So after I run SPC m s i I run SPC m s s and I get this as an output.#2018-08-0715:05Mario C.#2018-08-0715:05Mario C.{:user {:plugins [[cider/cider-nrepl "0.18.0"]]}}#2018-08-0715:05Mario C.That is what my profiles.clj looks like#2018-08-0715:05Mario C.@eggsyntax#2018-08-0715:05Mario C.Hope that clarifies what/why I was trying to ask#2018-08-0715:12eggsyntaxIt does. Don't know the solution to that one offhand -- I'd suggest posting that one in #cider. If I had to guess, I'd guess that either a) your system default versions of clj/s are old, or b) you're specifying old versions in your ~/.lein/profiles.clj.
You might also want to try creating a minimal new project with lein & verify that the problem is the same -- that should rule out it being something in your current project.#2018-08-0715:24Mario C.@eggsyntax Thanks for the help#2018-08-0715:25eggsyntaxNP, sorry I couldn't help on that one! I've encountered that, but not for a long time, & I totally forget the solution.#2018-08-0715:47Mario C.Its all good! It wasn't causing any issues but I don't like seeing warnings lol#2018-08-0700:16eggsyntax@stbgz yeah, youāre probably running up against the fact that CIDERās undergoing rapid changes at the moment. Try searching wrap-cljs-repl in the #cider channel (this one seems promising: https://clojurians.slack.com/archives/C0617A8PQ/p1533553278000102 ).
Or post it in #cider and theyāll walk you through solving it.
tl;dr ā this is a temporary problem due to CIDER churn, and you probably just have to fiddle with versions, maybe reinstall some stuff. Good luck!#2018-08-0700:16stbgz@eggsyntax thanks! appreciate the feeback#2018-08-0810:54reefersleepIād like to have RET insert a newline in the CIDER repl and C-<return> evaluate the sexp. Iāve tried entering the following into my dotspacemacs/user-config:
;; make cider repl indent and newline on enter and eval on
;; control-enter
(define-key cider-repl-mode-map (kbd "RET") #'cider-repl-newline-and-indent)
(define-key cider-repl-mode-map (kbd "C-<return>") #'cider-repl-return)
, and this makes the RET behaviour correct, but I cannot trigger C-<return> with my control key and enter key. Through other means, I can trigger it, if I do SPC : (named M-x) and then search for cider-repl-return.
Anyone know how to fix this? š#2018-08-0814:27eggsyntax@reefersleep dunno if there's something special about binding C-RET, but you might use SPC h d k to see what it's bound to, both before and after the attempt to bind it.#2018-08-0816:16ChaseC-RET is awesome! It closes all your ending parens before evaluation.#2018-08-0816:17ChaseI know that probably doesn't help but i've been loving it. to go to a new line i've just been deleting the last closing parens real quick before I hit RET. And then when I'm done with the multiline input I use the C-RET to get it all closed up nicely.#2018-08-0816:26eggsyntaxI've never really done it that way; I should try it. I usually just write my multiline stuff in whatever regular clj/s buffer I have handy, and then send it over to the REPL with , s e.#2018-08-0816:36Chasequick slack newb question. how did you make the , s e look like a code snippet?#2018-08-0816:36eggsyntaxBacktick: `#2018-08-0816:37eggsyntaxHeh, oh good, that worked, I thought it might screw it up.
`#2018-08-0816:37eggsyntaxOr triple-backtick
for multiline
stuff
different format as you can see#2018-08-0816:37Chase`SPC m b#2018-08-0816:38eggsyntaxClosing backtick too#2018-08-0816:38ChaseSPC m b#2018-08-0816:38Chasegot it.#2018-08-0816:38eggsyntaxIt's not lisp š#2018-08-0816:38Chasecool, thatnks!#2018-08-0816:38Chaselol#2018-08-0816:33ChaseYeah, i think as i get more experienced I'll go that route. Right now, repl first tinkering seems more natural for me because I'm getting tons of errors and using the (doc f) capability a lot! Plus the tutorials are half throwaway examples that I alter in various ways just to see what will happen so I find it easier to just stay in the repl for those. when i start building a real program i'll go the other way. I didn't know , can sub in for SPC-m though. One keystroke saved!#2018-08-0816:36eggsyntaxYeah, or you can set it to some other key if you prefer, it's dotspacemacs-major-mode-leader-key.
Yeah, I mean I write throwaway REPL code in whatever buffer is handy...I don't keep it there typically. I'm only using it as an easy way to write and edit multiline expressions.#2018-08-0816:39Chasecool. and then you just delete it from your program file? or do you have multiple buffers hooked into the same repl session?#2018-08-0816:41eggsyntaxEr...both. May not quite be understanding the question properly š
There's also , c s to get a scratch clojure-formatted buffer.#2018-08-0816:41eggsyntaxWait, no, that's custom.#2018-08-0816:42eggsyntaxIt's cider-scratch; I'm not sure if it's bound to anything by default.#2018-08-0816:43Chaseok. yeah i'm probably not explaining. basically i create a new project using lein like lein new app brave-book and I just do all the exercises in the core.clj file hooked into a repl. so it's probably not a emulation of how it is working in a real project.#2018-08-0816:43eggsyntaxI bind it in my .spacemacs:
(with-eval-after-load 'clojure-mode
(define-key evil-normal-state-map (kbd ", c s") 'cider-scratch)
)
#2018-08-0816:45eggsyntaxOh, yeah, in that case I'd likely just type it in the core.clj and then delete after sending to REPL (or else do a repeated edit-send cycle until I get to a version I'm happy with, and then leave it in core.clj, if it's something I actually want to keep).#2018-08-0816:47Chasei gotcha. this cider-scratch thing is neat. that could be handy for random tinkering. when people say they add something to their .spacemacs does that mean you put that function within the dotspacemacs/user-config function?#2018-08-0816:49eggsyntaxYep, correct. Along with a bunch of other clj-specific bindings (you can put all of them within the same (with-eval-after-load 'clojure-mode ...), no need to repeat that).#2018-08-0816:53eggsyntaxMine are all at https://github.com/eggsyntax/dotfiles/blob/master/.spacemacs if you're curious (but it's messy as hell, there are lots of easier-to-read ones out there).#2018-08-0816:54Chasenice. I'll bookmark it. I'm trying to learn "default Spacemacs" (which is probably considered absurd considering it's a heavily customized emacs already) before I change things too much.#2018-08-0816:55eggsyntaxTotally. In the long run you'll probably want a bunch of custom keybindings, that actually seems to be the most common case š#2018-08-0816:57Chasewhat does the clojure-lint layer provide you?#2018-08-0816:58eggsyntaxThis, which I find super-useful:
https://github.com/candid82/flycheck-joker#2018-08-0816:58eggsyntaxLinting on the fly#2018-08-0816:58eggsyntax(ie catching & displaying basic errors without having to run the code)#2018-08-0817:01Chaseok, cool, i'm going to try that. i imagine that could be helpful for a learner too#2018-08-0817:02eggsyntaxTotally! You'll want to read at least this bit to learn how to configure it to avert false positives:
https://github.com/candid82/joker#reducing-false-positives#2018-08-0817:08Chasecool. i'm tabling it for now but i will look into it soon. I have to figure out how to install joker and a couple other tweaks it seems. This is the rabbit hole that keeps me from doing actual clojure programming. hahaha. i knew opening up slack was a risk!#2018-08-0817:08eggsyntaxOh, that's right, you've gotta install joker separately, I forgot about that.#2018-08-0817:09eggsyntaxYeah, I lose WAY too much time tweaking my toolchain š#2018-08-0817:20eggsyntaxHmm, glancing back, I'm not sure there's any good reason to have both clojure-lint and syntax-checking, I'll have to look into that. Anyone else know offhand?#2018-08-0817:23Chasei do know that after adding clojure-lint and then commenting it out my spacemacs was all out of wack! lol. I had no syntax highlighting and all kinds of fun weirdness. I had to re-add a few packages to get back to normal. Thanks eggsyntax! Lol. I kid, I kid.#2018-08-0818:29eggsyntaxOops š#2018-08-0818:41eggsyntax@chase-lambert OK, looking back at discussion on my work slack, I actually meant the syntax-checking layer. I'm not sure why clojure-lint is in there, I'll try pulling it out when I get a chance. If you turn it on, then a) have to have joker on your path, and b) have to restart spacemacs.
Sorry for misleading!#2018-08-0818:44Chaseno worries! it's really my own damn fault for immediately installing something after 10 seconds of thought and foresight. a lesson i've learned too many times. people would be appalled at the amount of full powerwashes I do of my chromebook just cuz I'm ocd about one thing not working right and wanting everything fresh.#2018-08-0916:06Mario C.How long did it take y'all to get pretty comfortable in (spac)emacs?#2018-08-0916:07Mario C.What made me switch over was seeing a coworker just move real fast with it. Like if I was watching a ninja code lol#2018-08-0916:09eggsyntaxI think you never stop learning & growing & getting faster. Where would I tag that as "comfortable"? I dunno. I think I stopped tripping over things constantly within a week or two. But I was already a vim user, so I didn't have to relearn all the basic bindings.#2018-08-0916:09eggsyntaxThe classic answer is:#2018-08-0916:10eggsyntax#2018-08-0916:10Mario C.lol#2018-08-0916:10Mario C.I guess in about ten years Ill be moving comfortably#2018-08-0916:12eggsyntaxWere you already comfortable in vi? That def changes the learning curve a lot.
It helps if you periodically dedicate some time to actively improving your skills with it, an hour here & a half-hour there...#2018-08-0916:13Mario C.ESC : q was about all I knew#2018-08-1314:19kah0onaI learnt vim 4 years ago or something, it took me a few weeks to get reasonably fast. Then I added a few commands at the time. A year ago I moved from Vim to Spacemacs, so I āonlyā had to learn the space commands. The combination is gold. Check some youtube videoās on vim bindings/tips, and when you see something interesting, write it on a post-it.#2018-08-1314:21kah0onaFew things that improved my speed bigtime, was the moment I used these commands: ciw/ci[/ci( (cut-inner-block/paragraph/parens/), f+<a letter> to search in the line and quickly jump to it. Also I like the buttons #, % and * (resp. search word under cursor backwards, go to matching closing bracket under cursor, and search word under cursor forwards)#2018-08-1314:24kah0onagood luck on your journey, and remember also to get rid of anti-patterns asap, ie. using j/k continuosly to scroll large areaās. Getting rid of anti patterns is almost as important as learning new commands, but it kind of goes hand in hand (learning new command removes an anti pattern often)#2018-08-1314:28kah0onaand lastly, my life got infinitely better when I learned slurp and barf, since iām mostly using clojure nowadays.#2018-08-1314:28kah0onaSPC k b / SPC k s#2018-08-1314:30kah0onajust now reading that one post by Yan Pritzker. Thatās a great one yes.#2018-08-1315:20Mario C.Yea ciw/ci[/ci<anything> has been game changer for me as well.#2018-08-1315:21Mario C.Made it a point to learn the slurp commands as well and SPC k d x is one of my faves lol#2018-08-1317:19kah0onaah, i mostly do c i ( rather than SPC k d x, but the space command is probably better when i want to stay in that mode#2018-08-0916:14Mario C.Definetly getting better with it though#2018-08-0916:14Mario C.I have a cheatsheet open when i am editing#2018-08-0916:14eggsyntaxSo yeah, might be a little while š
I HIGHLY recommend reading this short article to understand the vim philosophy; it made all the difference in the world to me:
https://yanpritzker.com/learn-to-speak-vim-verbs-nouns-and-modifiers-d7bfed1f6b2d?gi=570fcb6d9e80#2018-08-0916:20Mario C.This is a good one, thanks#2018-08-0916:49eggsyntaxMaybe you deleted your comment? But saw it in notifications -#2018-08-0916:49eggsyntaxYou may want the Word noun instead of word, ie capitalized includes symbols and all non-whitespace#2018-08-0916:59Mario C.Yea I figured out how to do it. ctSPACE or dtSPC#2018-08-0917:00Mario C.But dW also works#2018-08-0922:25Chasewhere do i find the equivalent to vim-surround commands? is that part of lisp mode? i'm still learning all the slurp and barf stuff. does that kind of allow the same stuff? yeesh, that is not an attractive way to talk about code refactoring.#2018-08-1113:53practicalli-johnny@U9J50BY4C In Vim insert mode, you can just select the text you want to wrap, C-SPC and press the opening character to wrap the text with.
From Vim normal mode, you can call the smartparents wrap function if you want to wrap a word with (), Place the cursor on the word to wrap then press SPC k w. This also puts you into lisp mode, so you can wrap again with just w, or unwrap with W. The list mode uses smartparents, just gives you a specific state to do it all in, reducing keystrokes.
As lisp state is evilified, then you can use vim power for doing multiple tasks. For example, in lisp state if you have 3 words to wrap in parens, you could move the cursor to the first and press w 2 s. This would wrap the first word and slurp twice to bring the next two words inside.
Not sure how to wrap with another character, e.g. {} for maps or [] for vectors.
I am starting to put more examples of vim approaches in lisp state here: https://practicalli.github.io/spacemacs/structured-editing/lisp-state.html#2018-08-1115:55Chaseoh wow, this is some good stuff! Thank you!#2018-08-1007:43spfeiffervim-surround has nothing to do with slurp and barf. That is āpareditā.#2018-08-1012:00reefersleepIt seems like the Cider Repl History (as I read about here: https://github.com/clojure-emacs/cider/blob/master/doc/using_the_repl.md ) is not integrated into Spacemacs. Does anyone here have any experience spacemacsefying the cider repl history workflow?#2018-08-1012:02pauld<Ctl>-Up seems to work for me.#2018-08-1012:03reefersleepThe history buffer allows more complex stuff than C-up C-down#2018-08-1012:03reefersleeplike searching via a regex#2018-08-1012:03pauldah#2018-08-1012:03reefersleepand just visualizing your flow of actions š#2018-08-1012:03reefersleepSeems I can access it via , , his#2018-08-1012:03paulddidn't know about this#2018-08-1012:03reefersleepread in the linked text, itās interesting!#2018-08-1012:11pauldWhich features don't work for you?#2018-08-1012:16pauldHmmm, I was able to bring up the history buffer with C-c M-p but the history mode keys in that buffer are shadowed.#2018-08-1012:24pauldhmmm, maybe I should submit an issue? The docs (http://spacemacs.org/doc/DOCUMENTATION.html#concepts) say the shadowed keys should be moved like this: Shadowed keys are moved according to the pattern: a ā A ā C-a ā C-A#2018-08-1012:25pauldso quitting the history buffer should be Q in this case since q is shadowed.#2018-08-1012:49reefersleepNone of the features are bound to anything, but they are all accessible via e.g. SPC :#2018-08-1012:50reefersleepItād probably require some work to bind them properly in the context of spacemacs / evil mode#2018-08-1012:50reefersleepidk, I havenāt done any spacemacs / config development. I use spacemacs because I donāt want to fiddle with configs š#2018-08-1012:57pauldI submitted an issue. It seems that's what is normally done in this case. Those keybindings are usually 'evilified' according to the above pattern, but I'm not sure how they go about that.#2018-08-1013:02reefersleep:thumbsup: š¤#2018-08-1020:35Mario C.When I do SPC / I can do some searches but how can I choose which directory I do the search?#2018-08-1020:35Mario C.It defaults to project search#2018-08-1020:51Mario C.Answer: SPC s f#2018-08-1420:29Chasewhat is the equivalent to vim-commentary? I would be able to select lines of text and then just hit gc and it would comment or uncomment the text. super useful and i imagine there is something equivalent built in or readily available.#2018-08-1420:29Chasealso how do you folks prefer to move through your buffers more quickly than my current spc b b and then fuzzy search through the list?#2018-08-1421:18cjsauer@chase-lambert visual select (`v` / V) and then gc works for me. For buffer switching, I like to use [ b to go backwards, and then ] b to go forward. If that doesn't get me there in 1-2 hops, I like using SPC p f to fuzzy search files.#2018-08-1421:21cjsauerTo toggle commenting for the line your cursor is on you can do gcc#2018-08-1421:22spfeifferUgh, did not know about gc, i used dwim-comment command#2018-08-1421:22eggsyntaxI tend to do SPC c l for commenting lines.#2018-08-1421:23spfeifferSPC SPC dwim-comment#2018-08-1421:23spfeifferSo many ways š#2018-08-1421:23eggsyntaxBuffer switching I mostly do by project by SPC p h (`helm-projectile`). Or SPC b b if it's not a project buffer.#2018-08-1421:25Mario C.Can't you also use #_ to comment out Clojure blocks?#2018-08-1421:25Mario C.expressions*#2018-08-1421:26eggsyntaxYes, to comment out sexps (which can be as small as a single token, eg #_foo). That's my method of choice for commenting in clj/s.#2018-08-1421:28cjsauerSPC b b is good for quick-swapping to a buffer. The [ b and ] b commands are actually part of a larger "suite" of semantics. For example, ] e can be used to swap lines of code up and down, [ w can swap between windows, and I think ] q can be used to jump back and forth between errors in your buffers.#2018-08-1421:35cjsauer(Finally remembered the Tim Pope plugin where these hotkeys come from: https://github.com/tpope/vim-unimpaired)#2018-08-1421:35cjsauer] SPC is another good one for opening new lines before/after the cursor#2018-08-1421:45spfeifferThey all work out of the box in spacemacs?#2018-08-1422:53cjsauer@spfeiffer yep, I believe they come with evil mode#2018-08-1500:03Chasewell i feel silly for not trying gc before coming here asking for it but at least it started a good convo! i'm continually impressed with what comes included with default spacemacs#2018-08-1512:18practicalli-johnny@chase-lambert quite a few options around comments. I tend to use M-; at the start of a line, although SPC ; ; works pretty much the same. I am using getting more vim with gcc to comment a line and gcap to comment a paragraph.
Also found a way to create comment borders in vim normal state, e.g. for comment boarder of 42, I type 42 i ; then when I press ESC or fd vim inputs all 42 ; characters.
https://practicalli.github.io/spacemacs/documentation/comments.html#2018-08-1512:20practicalli-johnny@chase-lambert If you want to put the result of evaluating a Clojure function or symbol, you can use , e ; in vim normal state. This evaluates the current function the cursor is in, so its the same as , e f but you get the result as a comment.#2018-08-1514:09cjsauerIāve also been using the 42 i ; trick for creating sections in my code. Really handy. Did not know about eval as comment! I actually customized my dot file to add that functionality...good to know it already existed. #2018-08-1716:11practicalli-johnny@eggsyntax I also prefer #_ the reader macro comment, especially to comment out code that I occasionally want to evaluate. Someone gave me the following elisp code to insert this type of comment, works fairly well
https://gist.github.com/jr0cket/6c4e00410e3a5cd579af3b053a4142ac#file-spacemacs-el-L728#2018-08-1718:09eggsyntaxOh, yeah, that's nice; just bound it to C-<tab>.#2018-08-2008:49practicalli-johnnyI am running an in-person Spacemacs workshop for Clojure development Tuesday evening in London. Although there is no live streaming, there will be a recording a few days after. The workshop will cover some of the aspects covered in my ever growing guide https://practicalli.github.io/spacemacs/
https://www.meetup.com/London-Clojurians/events/rpbqcpyxlbkb/#2018-08-2017:24spfeiffer@jr0cket Great it will be recorded. Please provide us with a link when the recording becomes available.#2018-08-2017:31practicalli-johnnyOver the coming weeks I'll also create short videos of Spacemacs in action and add them to the guide and my YouTube channel#2018-08-2019:20Josh HorwitzAwesome @jr0cket I look forward to both things#2018-08-2220:57bmillsAnyone know of a good resource for setting up parinfer in spacemacs?#2018-08-2302:39_rj_r_@bryan778 from what I've read in the little research I did before giving in to smartparens.. is that you need to be on the dev branch for spacemacs for it to work at all.#2018-08-2302:41_rj_r_I just switched to spacemacs, so have been poking around at a few things.. still really new to it though.. as well as to emacs in general. After writing my own emacs config and understanding a few things.. finally went to spacemacs and it's been much less frustrating than the first time I tried it. Have had to tweak a few things though... but not too shabby overall#2018-08-2304:21spfeiffer@bryan778 Yes, you need to switch to the develop branch. Then just add the parinfer layer. Worked fine for me. #2018-08-2304:22spfeifferhttp://develop.spacemacs.org/layers/+misc/parinfer/README.html#2018-08-2313:01reefersleepWhen I do SPC m s x, I get Wrong type argument: commandp, cider-refresh. Anyone have a clue of what might be going on?#2018-08-2313:18bmills@spfeiffer thank you, will give that a shot. For some reason, from reading github, got the impression the parinfer layer had gotten killed.#2018-08-2313:20bmills@ryan.russell011 I'm in a similar boat. I'm a vim guy who coveted some emacs features, and spacemacs really fills that gap well. I tried looking at smartparens and got really confused by the available commands. Parinfer has been great in Cursive, but I think I like Cider a little better for REPL work.#2018-08-2313:21spfeiffer@bryan778 i can check later, i did not use parinfer for some time now.#2018-08-2316:32Mario C.Does anyone know how I can delete changes in magit?#2018-08-2316:32Mario C.If I type SPC g s I get the status buffer#2018-08-2316:33Mario C.And I can TAB on files to see their changes. At that point is there a way to pick-n-choose what I want to keep and what I want to undo?#2018-08-2316:37zlrthx#2018-08-2316:37zlrthmagit-delete-thing#2018-08-2316:39Mario C.I basically see something like this
-(defn my-funk [] (println "funky town"))
+(defn my-funk [] (println "Groovy"))
#2018-08-2316:39Mario C.How can I say undo that and go back to previous version?#2018-08-2316:39Mario C.I do x. It asks whether I want to delete hunk?#2018-08-2316:41zlrthif you have unstaged changes, and you magit-delete-thing them, theyāll go back to what they were as of your most recent commit#2018-08-2316:42zlrthitās asking you whether you want to delete hunk because once you delete that hunk, itās gone.#2018-08-2316:42Mario C.Will this do it for the whole file?#2018-08-2316:42Mario C.Because I want to keep some changes#2018-08-2316:42zlrthonly for the hunk. though iām not looking at your screen, so i canāt tell what youāre trying to do.#2018-08-2316:44zlrthi think thereās no shame in sanity-copying the file to another directory for safe keeping, until youāre more comfortable with git simple_smile#2018-08-2316:45Mario C.I have a file with multiple changes. When I do SPC g s I can see the file. I can also TAB it and see the changes in that file#2018-08-2316:46Mario C.I was just wondering whether or not I can pick n choose what changes I want to keep and changes I want to revert.#2018-08-2607:25practicalli-johnny@UB0S1GF47 Git groups changes in a file into what it calls hunks. Sometimes a hunk can contain more changed like that you want to work with (un/stage, delete). You can tell git to split hunks, although using select in Magit gives you much more control.
To delete one or more changed lines in a file, select the lines using v in vim mode or C-SPC in Emacs mode. Then run the action you want. x to discard the selected line(s)#2018-08-2316:46minimaluse V to select the lines you want the do u or s (unstage or stage)#2018-08-2316:48Mario C.The changes are unstaged though#2018-08-2316:49minimalselect the lines you want to stage in press s#2018-08-2316:51Mario C.I guess there is no way to do what I am thinking of doing lol#2018-08-2316:51Drew Verleeim on the dev branch, on ubuntu, when i open spacemacs and open a file, it inserts what ever was in my copy/paste bin randomly into the file.#2018-08-2316:52Drew Verleehas anyone experienced this before? i cant imagine what i have done to bring this on, it doesnt seem to happen happen all the time. is there a way to track down behavior like this?#2018-08-2607:18practicalli-johnny@U0DJ4T5U1 Yes, pasting when opening in the file has happened before from the Spacemacs homepage. Add this line to the dot Spacemacs/user-config section of .spacemacs to prevent it. Or just open the file with RET instead of the mouse.
(define-key spacemacs-buffer-mode-map [down-mouse-1] nil)
#2018-08-2316:55Mario C.@mfm you were right, thanks! :thumbsup:#2018-08-2316:55Mario C.Just had to go for it and not be scared of the word 'hunk'#2018-08-2402:15Josh Horwitz@jr0cket Has the recorded video of the talk surfaced yet?#2018-08-2623:03practicalli-johnnyI am afraid the venue didnt record the event and my own screen recording failed for some reason.
I will try and find time to do the workshop virtually, once I have successfully tested my youtube live skills.#2018-08-2410:58nberger@drewverlee by any chance, are you using spacemacs inside of tmux?#2018-08-2415:14Drew Verleenope, i found a issue on the spacemacs repo that describes my issue. thanks for the consideration though š#2018-08-2418:07nbergerGreat that you found it :)#2018-08-2420:15Mario C.In IntelliJ's Cursive I had the ability to right-click in the editor and then choose annotate which would then show the last person who committed the current line. Does this functionality exists in Spacemacs?#2018-08-2420:35gieschSPC-g-b will give you a git blame view of the file; q to get out#2018-08-2420:36gieschi donāt know of anything for just one line#2018-08-2717:57Drew Verleewhen in visual mode, i want to delete a section of selected text, so i press d. this ends up deleting the whole line. Is that the correct behavior? if so what is the command to just remove the highlighted text#2018-08-2717:58Drew Verleei looked at like 3 resources and assume im not understanding the terminology.#2018-08-2718:05Drew Verleehm ok i restarted emacs and its working#2018-08-2720:02practicalli-johnny@drewverlee I have been using x to cut a selected region with visual mode, v. Is there a difference between d and x when removing a region selected in visual mode? I guess a region is treated as both a line and a character by each keybinding respectively#2018-08-2801:50pabloreA recent package update on my develop spacemacs is giving the following error:
error: Unable to activate package 'ace-jump-helm-line'.
Required package 'helm-1.6.3' is unavailable
Anybody know how I can fix it? Iām a total emacs noob#2018-08-2802:05pabloreIt appears it is a emacs 26 issue#2018-08-2802:06pabloreNo idea why my dock executable emacs started executing 26 instead of 25#2018-08-2805:23emilaasa@drewverlee x deletes characters and d deletes lines#2018-08-2813:45Drew Verleethanks, i must have remapped it on my old config#2018-08-2819:11eggsyntaxAnyone know offhand how to generate tags for a clj project? I usually don't bother, because CIDER handles jump-to-def etc for me, but I'm looking at a project that would be a hassle to get CIDER going on, so it'd be nice to be able to just use tags for that.#2018-08-2819:12eggsyntax(in spacemacs or, failing that, from the CLI -- neither my ctags nor etags lists clj as a supported lang. I don't have much experience with either)#2018-08-2821:19simonhey everyone ā out of the blue whenever I enter d the entire line gets cut when Iām in normal mode. Any thoughts on what could be happening?#2018-08-2821:20eggsyntaxPossible that caps lock is on?#2018-08-2821:20eggsyntaxOtherwise, try SPC h d k to describe the key, and enter d, see what it says that d is bound to.#2018-08-2821:20eggsyntax^ @simon.orlovsky#2018-08-2821:21simonthanks @eggsyntax#2018-08-2821:21simoncaps lock is not on#2018-08-2821:21simond runs the command evil-delete (found in evil-normal-state-map), which is an
interactive compiled Lisp function in 'evil-commands.el'.
It is bound to d.
(evil-delete BEG END &optional TYPE REGISTER YANK-HANDLER)
Delete text from BEG to END with TYPE.
Save in REGISTER or in the kill-ring with YANK-HANDLER.
#2018-08-2821:21eggsyntaxOh well, caps-lock would have been the easy case š#2018-08-2821:22eggsyntaxevil-delete is the right thing for it to be bound to. Do you have some text selected?#2018-08-2821:22eggsyntaxAlso, just to be sure -- when you hit d and then no other keys afterward, does it still delete the line?#2018-08-2821:24simonyeah ā so for instance if is try to run d-w the entire line will delete then will shift over one word#2018-08-2821:24eggsyntaxVery weird. Does it persist after spacemacs restart?#2018-08-2821:25simonI have a repl started so Iāve been hesitant š
ā Iāll give it a go#2018-08-2821:25eggsyntaxI definitely get that reluctance š#2018-08-2821:28simonrestarting did it. all is well in my emacs universe again ā thank you @eggsyntax#2018-08-2821:28eggsyntaxNP -- that was a weird one š#2018-08-2823:10Chasei see a lot of people need to restart emacs to get some weird behavior corrected. i've seen others claim however (usually when talking about start up time) they start emacs up once and it's open for a month or something wild. isn't one of the benefits of emacs/lisp is you can fix this stuff on the fly? I'm not complaining, just curious and on a break. feel free to ignore.#2018-08-2823:39eggsyntaxFor me it's similar to the REPL, in that I restart it a lot less as time goes on and I get more used to how to make it work for me.#2018-08-2907:36reefersleep@chase-lambert Iāve been curious about the same. Iāve restarted emacs loads in the past. I think itās been a bad habit that carried over from other tools, though - I do it much less these days. But it does not feel as awesome as people have described, yet. I certainly not keep it open for months!#2018-08-2907:38reefersleepDonāt know if @bozhidar already reported this, but Iām just going to quote him here (referring to cider-refresh, which doesnāt work for me, in a discussion yesterday):
> bozhidar [5:13 PM]
> @reefersleep yep, I finally get it.
> This command was renamed a while ago to cider-ns-refresh or something like this. I guess that wasnāt reflected in spacemacs.
> I thought weāve added some alias, though. Guess we didnāt and we should change this.
> bozhidar [5:40 PM]
> OK, turns out that thereās an alias, but unlike the real function in wasnāt autoloaded, therefore your problem. Iāve fixed this, but also has to be fixed upstream.#2018-08-2907:39reefersleepIām at work and donāt have time to research how to report bugs in spacemacs, so thisāll have to do for now. Hope someone picks it up!#2018-09-0111:34practicalli-johnny@reefersleep cider-ns-refresh has been fixed in the develop branch of Spacemacs already, so no need to raise an issue. You can see the updated code here:
https://github.com/syl20bnr/spacemacs/blob/develop/layers/+lang/clojure/packages.el#L134#2018-09-0114:35reefersleepGreat!#2018-08-3020:19kommen@simon.orlovsky you probably ran into https://github.com/syl20bnr/spacemacs/issues/10410#2018-08-3118:44Drew Verleemy current project uses single semicolons for comments and when ever i touch a file with one this happens:
before:
; happy comment
(some code)
after":
; happy comment
(some code)
any ideas on how i can get it to stop doing this indentation? i cant think of any reason why this would be helpful#2018-08-3118:48eggsyntaxHeh, there's been some debate about it. The Lisp standard for line comments is double-semicolon, and that's what emacs goes with. Single-semicolon comments are indented on the assumption that they're not line comments.#2018-08-3118:49eggsyntaxCursive indents single-semicolon at the beginning of the line as line comments, so mixed-IDE teams can have conflict about it.#2018-08-3118:50eggsyntaxSince Bozhidar was unwilling to change it on our side, Colin was kind enough to add an option in Cursive which would follow the Lisp/CIDER indentation. Not sure if that's in the latest stable Cursive version yet, but it's in the unstable.#2018-08-3118:52Drew Verleethanks a ton egg. So this is something clojure mode is doing? is it possible to change the defaults to that it treats single semis the same way it treats doubles?#2018-08-3118:56eggsyntaxI forget where exactly that lives, whether it's clj mode or cider (or one of the subsidiary packages). I remember it came down to @bozhidar, so it's one of the packages he manages. When I was in this situation (mixed-IDE team) I looked briefly into changing it, and it looked like changing it would be harder than convincing my team to switch to the double-semicolon standard š
There's definitely a good argument that double-semicolon line comments are the correct choice, which makes a decent starting point if you want to try to get the other folks on the project to switch.#2018-08-3119:04Drew Verleegood to know. hmmm#2018-09-0100:57practicalli-johnny@drewverlee the default comment for a line in Clojure is ;;. If you use M-; or SPC ; ; or g c c then you will comment a line with ;;.
My personal view is that commenting lines with a single semi-colon is incorrect syntax for Clojure / ClojureScript code and I would refactor all the comments to be the correct syntax as a separate commit. Updating your project in this way would be an opportunity to use iedit more.#2018-09-0101:14Chaseiedit looks useful. is it kind of like the global substitution capability in vim? or actually it sounds more like neovim's where it shows you what the changes would look like in real time, huh?#2018-09-0106:22practicalli-johnny@chase-lambert iedit can do some great thing and is even more powerful when you use with narrowing, SPC n menu.
If you want to change multiple things just in one region or function, you can use narrow to bring up a temporary buffer to make your changes in. When you have finished making your iedit (or other changed) you widen, SPC n w and return to the original buffer with you changes in place.#2018-09-0101:32Chaseand I apologize if I've asked this here before but in terms of using spacemacs/cider, when I run across a random tutorial or project on github that I want to tinker with it almost always at some point says "and just run lein repl and do this..." If I use lein to create the project but then use cider jack-in while in the project in Spacemacs then am I getting the exact same functionality as I would be if I was just using lein repl in my regular terminal?#2018-09-0102:44pauldyes, but you have all the cider-emacs stuff, clojure mode and whatever else is included in the spacemacs clojure layer.#2018-09-0102:44pauldas well#2018-09-0106:09practicalli-johnny@chase-lambert to reiterate on what @pauld said, you get more functionality, but yes, where you see lein repl you can use cider-jack-in instead.
cider-jack-in is the same as running lein repl in a terminal and then running cider-connect to connect your editor to the REPL (using the nrepl protocol). This connection allows you to evaluate Clojure code in a an Emacs buffer as well as have an interactive repl buffer. When Emacs is connected to the REPL you have the full development experience.#2018-09-0315:02practicalli-johnnyCider 18 stable release is out (non-snapshot) and so the next time you do a package update it will be installed. I am testing it out on my other computer and seems to be stable. There is some new connection management code so you can be selective in what repls you want to run (clojure / clojurescript / both)#2018-09-0317:15kommenI was running cider 0.18 all day long today with current spacemacs develop and also didnāt encounter any problems so far š#2018-09-0322:35theeternalpulseIs there a good guide on slimming down spacemacs layer packages#2018-09-0323:45practicalli-johnny@U1CUUKHDL suggest starting with the spacemacs-base distribution when you install Spacemacs. That will give you a minimal set of packages. Then you can add from there.
Also, selecting Ivy is described as more lightweight than helm
If you have already installed Spacemacs, then first move the .emacs.d directory and the .Spacemacs file out of the way. Then clone Spacemacs and run Emacs to install the base distro (it's the second install question I believe).#2018-09-0400:02practicalli-johnnyIf you don't want to reinstall, then remove the layers you know you don't want from the .spacemacs file and also set the distribution with dotspacemacs-distribution variable.
https://github.com/syl20bnr/spacemacs/blob/master/doc/FAQ.org#what-is-the-difference-between-spacemacs-base-and-spacemacs-distributions#2018-09-0410:53practicalli-johnnyI tried the Spacemacs base on a different machine today and there are lots of little things I miss. fd for escape, SPC 1 to change windows, SPC q r to restart, etc#2018-09-0413:06eggsyntax@U1CUUKHDL FWIW, if you really want a slim emacs, SM may not be your best bet -- it's inherently a batteries-included distribution. For me it's been well worth the bulk, though š#2018-09-0415:03practicalli-johnny@U1CUUKHDL FYI selecting Vim and spacemacs-base will install 27 packages (97 packages in the full distribution). If you only use Emacs keybinding / editing style, I imaging there are fewer packages... but at some point I am also not sure what benefit you have of using Spacemacs. I found spacemacs-base unproductive as I have been spoilt by all the wonderful things in the full spacemacs distribution#2018-09-0415:08theeternalpulseGreat tips. I definitely enjoy what spacemacs offers, I see it as great for newcomers to catch up on the editor which has a long history, bit at 300+ packages I would love it to be more customizable on the layer level by default. #2018-09-0415:09theeternalpulseI did hear a contributor say on gitter it's planned to revamp the config to do exactly that#2018-09-0516:33practicalli-johnny@U1CUUKHDL it is easy to ignore package in a layer or exclude packages you do not want once you know the names of them. https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#selectingignoring-packages-of-a-layer
You can see which packages a layer includes by looking on the spacemacs github code, the packages.el file for each layer lists all the packages that layer pulls in.
You can also just delete the names of the layers you dont actually use (even though you thought you would when you added them). Most layers lazily load, so its very rare to have all packages running all the time unless you multi-task a lot.#2018-09-0400:25_rj_r_quick question, why does either the git layer or the version control layer adding things to my global gitconfig? Is that really necessary? ... I looked around and couldn't find a suitable answer... if someone has a good resource, let me know please.#2018-09-0400:33lilactown:thinking_face: I donāt use the version-control layer, whatās it adding?#2018-09-0400:47_rj_r_dammit.. I removed what it added so I don't have it readily available. I have both the git and the version-control layer. Maybe I don't actually need (or want) both? hmm.. I'll have to look at it more.#2018-09-0400:48lilactownIāve never enabled it. I use magit every day ĀÆ\(ć)/ĀÆ#2018-09-0400:48lilactownI do have the git layer enabled#2018-09-0400:48_rj_r_oh right, version-control adds git gutter functionality, which I like.. and pretty sure magit can do the same thing... I just commented it out... so I guess I'll find out lol#2018-09-0400:49_rj_r_I'll post what is being added to gitconfig if it comes back up#2018-09-0412:00troglotitHey! Recently I did SPC T s spacemacs-dark although I had spacemacs-dark already, and it changed keywords like ns, defn, etc into italics, and I quite like it. Problem is - how to make that permanent?#2018-09-0412:07pauldSPC f e d#2018-09-0412:07pauldshows your .spacemacs file#2018-09-0412:07pauldThere is a section on themes there.#2018-09-0412:09pauldI haven't tried it though... mine defaults to spacemacs-dark and I suspect yours does as well so I'm not sure why you see a difference when doing SPC T s spacemacs-dark.#2018-09-0412:24troglotitYeah. Maybe thatās because of specific revision of develop branch. I havenāt updated for a long time and Iām going to change machines, so I think Iām not going to try to update spacemacs these days. š#2018-09-0415:16practicalli-johnny@troglotit interesting, i noticed the italicisation of ns and def, defn myself (just updated spacemacs). This happens when ever I change the theme, even spacemacs-light, but these names do not show as italic when setting the theme in .spacemacs. I can only assume that its a matter of when things are loaded. I assume the theme is loaded before the Clojure layer, so perhaps something in the Clojure layer changes the theme settings. So when you apply the theme, all its settings are restored.
Interestingly you get the same effect with Emacs lisp files. If you open .spacemacs then defun is not italic. Applying the theme again makes defun italic.#2018-09-0421:01Mario C.I am using regex match to replace certain things in my file. How do I match and choose one by one the matches I want to replace and the ones that are false positives, skip?#2018-09-0421:57Mario C.The solutions was :%s/<regex>/<replace>/gc#2018-09-0422:40lilactownI also often use the Emacs-y M-% aka query-replace#2018-09-0713:38reefersleepIām trying to use reset a file in magit via spacemacs. I get a prompt to select my revision, no problem - then I have to write my filename. I get no narrowing support or anything, it seems like I have to spell out the filename char for char. This canāt be right, or what?#2018-09-0713:39reefersleepAlso, writing HEAD takes forever. Maybe I have too many local branches?#2018-09-0713:42reefersleepAlso, after writing out the filepath/name char for char and pressing ENTER, the editor hangs.#2018-09-0713:42reefersleepš#2018-09-0716:06practicalli-johnny@reefersleep is magic in online mode? If it's a big project it may be trying to update the pull requests list. Assumes you are using Spacemacs develop and have a fairly recent version then Magit should say if it's online.
Or yes, it could just be a lot of local things to traverse#2018-09-1008:19reefersleep@jr0cket I donāt know what online mode is. Iām not using the develop version. But I do have a lot of local stuff š#2018-09-1008:21reefersleepDo you know whether Iām supposed to get narrowing options when writing the filename?#2018-09-1010:42practicalli-johnny@U0AQ3HP9U sorry, I am not clear on what you are trying to do, so would need more info to replicate.
If you are reverting a commit, then you shouldn't need to specify a file, just the commit you want to revert to.
If you want to discard changes in a file that are not committed, then you shouldnt need to specify the file either, as you would just navigate to the file name in magit-status and press x.
If you can elaborate what you are doing then I may have some suggestions (other than delete all the local branches you dont need).#2018-09-1010:45reefersleepIām trying to reset exactly one file file to an earlier commit. I donāt have any uncommitted changes.#2018-09-1010:46reefersleepFrom the magit buffer, I do O to get to the *magit-reset-popup*, then f to reset a file#2018-09-1010:47reefersleepI then have to enter a commit into Checkout from revision:, complete with narrowing options. I can choose e.g. a branch name or HEAD^^ or whatever.#2018-09-1010:48reefersleepWriting HEAD^^ takes a long time - once Iāve written HEA, the editor hangs for a while, then the same happens for each subsequent symbol.#2018-09-1010:51reefersleepHm, it seems Iām getting narrowing options now when I have to specify the file, after specifying the commit I want to reset to. Thatās one problem out of the way.#2018-09-1010:52reefersleepNow I think Iāll try to remove some state to see if my Checkout from revision: stage can become more snappy.#2018-09-1015:37practicalli-johnnyI do get helm narrowing when prompted for the file name.
I suggest its either your project or possibly and a bug in the magit package, or there is a fix in spacemacs that is only in develop.
I just opened a simple project with a handful of commits, ran magit status, pressed O, selected master branch and was prompted with the typical helm narrowing popup to choose the file.
Suggest you try this on a simpler project with fewer branches before changing anything with spacemacs.#2018-09-1109:38reefersleepThanks for helping out, Iāll experiment š#2018-09-1620:15Daniel HinesIām having some trouble with the clojure-lint lint layer. I got it working on my windows machine once, but I canāt get it working on my Mac. Iāve installed joker (via homebrew) and enabled the layer, but when I open a clojure file with linting errors, I donāt see anything.#2018-09-1621:50practicalli-johnny@U8QTB156K
Hmm, I just installed it on Ubuntu and it works with Spacemacs develop. Sorry, that doesnt help you very much.
I assume you restarted Spacemacs after adding clojure-lint to the .spacemacs file. And you checked that joker worked by running it on the command line with a clojure file?#2018-09-1621:56practicalli-johnnySPC f y y will copy the path for you or M-: (getenv "PATH") will display the the exec path that Spacemacs uses in the mini buffer.#2018-09-1621:58practicalli-johnny(add-to-list 'exec-path "~/.local/bin/") will add a path to Spacemacs, in this case ~/.local/bin. If required, add this code to your dotspacemacs/user-config section of .spacemacs file. I would advise restarting Spacemacs to ensure this code is evaluated and the path is added, or you can just check the path with the previous command I mentioned#2018-09-1622:09Daniel HinesCorrect, I did all those things. #2018-09-1622:09practicalli-johnnyIf none of that works and you are using the develop version of Spacemacs, then perhaps pulling the latest commits may fix the problem. It sounds similar to the issue raised here https://github.com/syl20bnr/spacemacs/issues/10851#2018-09-1622:18Daniel HinesThanks @U05254DQM, Ill give that a shot when I get home#2018-09-1811:01practicalli-johnny@U8QTB156K did you manage to fix the clojure-lint layer problem?#2018-09-1620:16Daniel HinesAnyone have any tips? Iām not sure how to begin to debug it.#2018-09-1813:08kirill.salykinhey, anyone who uses lispy/lispyville here?#2018-09-1813:15kirill.salykinI am trying to enable lispy-pair and lispy-quote
https://github.com/noctuid/lispyville#relationship-with-lispy
but no luck so far, please advice#2018-09-1813:15kirill.salykinthanks!#2018-09-1813:28jeff.terrellI haven't tried using them, sorry.#2018-09-1813:37kirill.salykinno worries#2018-09-1814:44practicalli-johnny@kirill.salykin as lispy does what Spacemacs Evil mode and clever-parens already does, you make have to make significant changes to Spacemacs. You should probably create your own clojure layer too. I could be wrong, but it sounds like a big task. I suggest discussing this kind of change in the Spacemacs gitter channel with the project maintainers to get a sense of whats involved.#2018-09-1814:45kirill.salykinI donāt want all lispy, just lispy-pair and lispy-quote#2018-09-1814:55practicalli-johnnySorry, I dont know what those two functions do and they dont seem to be in the lispyville.el file.#2018-09-1814:56kirill.salykinI think they are part of lispy⦠as lispyville says - you should bind it yourself, but I have no idea howā¦#2018-09-1814:56kirill.salykinanyway, thanks#2018-09-1815:00practicalli-johnnyare you just asking how to do a keybinding for a function?#2018-09-1815:00kirill.salykinI think soā¦#2018-09-1815:01kirill.salykinwhat I want is to run lispy-pair in insert mode on (#2018-09-1815:01kirill.salykinbasically thats it#2018-09-1815:02kirill.salykinand lispy-quote in insert mode whtn " pressed#2018-09-1815:03practicalli-johnnyhttps://github.com/abo-abo/lispy/blob/master/lispy.el#L9031 onwards has lots of examples of defining a keybinding in lispy. You could add the bindings to your own local copy of lispy and load that#2018-09-1815:03kirill.salykinthanks! will have a look#2018-09-1815:05practicalli-johnnyor you can add to the dotspacemacs/user-config section of .spacemacs as in the following examples https://gist.github.com/jr0cket/01e2a8a9bf85d28d5782820e8e2891a3#file-spacemacs-el-L494#2018-09-1815:05kirill.salykinthis was my idea#2018-09-1815:06kirill.salykinthanks!#2018-09-1815:07practicalli-johnnyif needed, you can also add your own functions there, in case you needed a wrapper function or copy something across from lispy https://gist.github.com/jr0cket/01e2a8a9bf85d28d5782820e8e2891a3#file-spacemacs-el-L723#2018-09-1815:12kirill.salykin@jr0cket
`#2018-09-1815:12kirill.salykin(evil-define-key 'insert 'global "(" 'lispy-parens)
(evil-define-key 'insert 'global "[" 'lispy-brackets)
(evil-define-key 'insert 'global "{" 'lispy-braces)
(evil-define-key 'normal 'global "\"" 'lispy-quotes)
(evil-define-key 'visual 'global "\"" 'lispy-quotes)
(evil-define-key 'insert 'global "\"" 'lispy-quotes)
#2018-09-1815:12kirill.salykinthis worked for me#2018-09-1815:12kirill.salykinthanks a lot!#2018-09-2412:56kirill.salykinHi, I am trying to set (setq cider-eval-toplevel-inside-comment-form t) inside user/config to evaluate inside comments expr, but it seems not working
anyone has the same issues?
(https://clojureverse.org/t/anyone-else-gets-annoyed-with-cider/2399/5)#2018-09-2414:10practicalli-johnny@kirill.salykin I dont have the same problem, but that is because I use the reader macro #_ rather than (comment ). For example, #_(+ 1 2 3) instead of (comment (+ 1 2 3))#2018-09-2414:10kirill.salykini see#2018-09-2414:11kirill.salykinthanks#2018-09-2414:11practicalli-johnnyhowever, if you want to still use comment, I'll take a look.#2018-09-2414:11kirill.salykinit would be niceā¦#2018-09-2414:11practicalli-johnnydid you try the other two setq functions and did they work?#2018-09-2414:12kirill.salykinactually I didnāt#2018-09-2414:12kirill.salykinmaybe it is not right place to change cider..#2018-09-2414:13practicalli-johnnyIt may be something simple like you have an older version of cider. For spacemacs, do you use the master branch or did you switch to the develop branch before first installing spacemacs#2018-09-2414:14practicalli-johnnyif you are not sure, you could also try calling the function cider-version, eg. SPC SPC cider-version#2018-09-2414:14kirill.salykinI am on develop branc#2018-09-2414:14kirill.salykin0.18.1 snapshot#2018-09-2414:15practicalli-johnnyoh, you are ahead of me for Cider, I'll have a look at updating my version today#2018-09-2414:16kirill.salykinthanks#2018-09-2414:16practicalli-johnnyOkay, so it seems you should have the version that has those pull request in. so maybe it is the way you are adding the setq code to dotspacemacs/user-config. did you just copy the line as is into this section?#2018-09-2414:18kirill.salykinyes#2018-09-2414:18kirill.salykinAlso I put it i user-config#2018-09-2414:22practicalli-johnnyDid you evaluate the (setq cider-eval-toplevel-inside-comment-form t) expression, eg. with , e e or C-x C-e or reloading the .spacemacs config with SPC f e R or simply restarting Spacemacs?#2018-09-2414:25kirill.salykinI restart spacemacs#2018-09-2414:25kirill.salykinbut didnt evaluate#2018-09-2414:25kirill.salykinIāll play with it in the evening#2018-09-2414:25kirill.salykinwith evaluation it will be way faster#2018-09-2414:25kirill.salykinthanks!#2018-09-2414:28jeff.terrellKudos to @jr0cket for all the Spacemacs help! š#2018-09-2415:26practicalli-johnnySomeone might think I was writing a book on Spacemacs š
https://practicalli.github.io/spacemacs/#2018-09-2414:29kirill.salykinindeed!#2018-09-2414:29kirill.salykinthanks a lot#2018-09-2414:39practicalli-johnnyThe (setq cider-eval-toplevel-inside-comment-form t) didnt work for me, when testing on something simple like (comment (str "i am not a comment")). I am on version 0.18.0 but that should still have the June pull requests. I'll upgrade packages and see if that helps. If its not the version, then maybe it needs to be inside an add-hook function to avoid being overwritten when the Clojure layer lazily loads.#2018-09-2414:40kirill.salykinpossibly, iāve been thinking about addhook as well#2018-09-2414:49practicalli-johnnyI'll try this add-hook config when i have updated the packages in spacemacs (as its still not working) https://gist.github.com/jr0cket/eeadeed6482149e23928d3354fc83e6c#file-spacemacs-el-L747-L749#2018-09-2415:15kirill.salykindidnāt work for me as well#2018-09-2415:17practicalli-johnnyNope, didnt work. Not sure why this is actually needed. If you put your cursor at the end of the line in Vim normal mode and evaluate with , e e then it will return the value of the expression inside the comment expression already#2018-09-2415:20kirill.salykinI now eval region#2018-09-2415:20kirill.salykinseems a bit faster to eval at defun#2018-09-2415:23practicalli-johnnyAh yes, you can select an expression inside the comment function with SPC v and then evaluate the region with , e r, thats nice#2018-09-2415:26practicalli-johnnySomeone might think I was writing a book on Spacemacs š
https://practicalli.github.io/spacemacs/#2018-09-2415:45practicalli-johnny@kirill.salykin If you are interested in using the #_ alternative to comment, I have a little function that toggles those characters and a keybinding to call it https://gist.github.com/90c415dbc268be32b3ffe16bf40012fc#2018-09-2415:46Andrea Imparatois anybody having issues when printing large strings on the repl?#2018-09-2415:46Andrea Imparatoemacs gets very laggy when I do so š#2018-09-2415:46Andrea ImparatoI've been told it could be font-lock-mode#2018-09-2416:15kirill.salykinThanks for tip @jr0cket and thanks for the book, I think I read couple chapters#2018-09-2416:17practicalli-johnnyThere is still a lot to add to the book and ideas are most welcome#2018-09-2416:24practicalli-johnny@andrea.imparato if the repl if formatting that string then it could be font-lock. The repl should truncate results, so you must have some really big strings, so do you have any examples?
I can parse a whole book and print it out in the repl without any real lag:
https://github.com/practicalli/clojure-through-code/blob/master/src/clojure_through_code/xx-hhgttg-book.clj#2018-09-2416:26practicalli-johnnyIf you are generating strings with code and want to see the results, you can also try , e P to print into a separate buffer. I am unsure if this will help with your lag though.#2018-09-2416:33Andrea Imparatoyep the repl is formatting the string because it's not a string, it's a huge map generated from a xml file#2018-09-2416:33practicalli-johnnyYou can always toggle font-lock mode for a buffer via SPC SPC font-lock-mode#2018-09-2416:34practicalli-johnnyAh, XML, that sounds like a challenge, especially if it is deeply nested#2018-09-2416:37practicalli-johnnycould you use https://clojuredocs.org/clojure.core/spit to push it to an external file and then look at it. Or just use the keys in the clojure map to check the parts you are interested in at any particular time.#2018-09-2416:40practicalli-johnnyusing get-in really-big-map [:keys :to :interesting :part]#2018-09-2917:39Daniel Hines@jr0cket, thanks for your help on the Clojure lint layer. Sorry I couldnāt get back to you earlier. It seems like it is indeed a path issue. which joker from my terminal prints out /usr/local/bin. However, when I start up emacs and run which joker from EShell, it canāt find it, and env | grep "PATH" is different from in my terminal. Running (add-to-list 'exec-path "/usr/local/bin/") doesnāt seem to fix the issue. Any idea why my path is different inside emacs?#2018-09-2917:49practicalli-johnny@d4hines can you try running Emacs from the command line (terminal window), assuming you aren't doing so already. Then check if you get a different path.#2018-09-2917:51practicalli-johnnyOh and thanks for asking about Joker, it prompted me to use it and I fond it really useful every day.#2018-09-2921:53Daniel Hines@jr0cket, running emacs from the terminal window indeed resulted in a different path, and which joker returns the correct path. Still not getting the linter to work though.#2018-09-3006:51practicalli-johnny@d4hines it sounds like you only have joker defined in your path for interactive shells, i.e. when you run a terminal application. It is recommended to set PATH in shell configuration files that are sourced unconditionally (i.e. when run from the Mac OSX GUI launcher), such as .profile, .bash_profile or .zshenv.
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
Alternatively you could source the configuration for interactive shells, .bashrc or .zshrc from .profile (or .bash_profile, .zshenv) so you always get the same PATH regardless of how you run your application.
# if running bash and .bashrc file exists, then read in the values
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
#2018-09-3006:52practicalli-johnnyWhen setting environment variables in .profile you will need to at least logout/login to the operating system (or restart) before those variables are picked up.#2018-09-3007:04practicalli-johnnyIf joker is on the exec-path when Emacs has started and its still not working, then that is a problem. I would
- check joker file is executable, eg. chmod a+x joker
- delete the flycheck and flycheck-joker packages from ~/.emacs.d/elpa/<emacs-version>/<spacemacs-branch>/ and restart Emacs. Then Spacemacs will download the package again (sometimes a package can get corrupted when downloading)
- update Spacemacs (I assume you are running develop, if not then consider using develop, as master is a long way behind)
- update the packages using the Update Packages link on the Spacemacs home page and restart Spacemacs, SPC q r (and maybe restart a second time if there are more than a couple of package updates just to make sure).#2018-10-0408:20plexusDoes anyone know anything about the status of Spacemacs? Looking at the repo the last activity on the main branch was over three weeks, and issues and pull requests are being added at a rate of several per day...#2018-10-0408:29vijaykiranhttps://github.com/syl20bnr/spacemacs/commits/develop#2018-10-0408:29vijaykiranactivity happens on develop not on master#2018-10-0408:30vijaykiranalso - I donāt think 3 weeks is enough to worry about such a large project#2018-10-0408:38plexus@vijaykiran I was talking about the develop branch. I do find it worrisome that such a project is apparently hinging on a single maintainer.#2018-10-0408:40vijaykiranIām not sure if thatās a red-flag yet š#2018-10-0408:41vijaykiranpersonal anecdata is that I am always on develop and it has been stable software - so no-commits donāt worry me that much#2018-10-0408:42plexushmmm I guess we have different experiences. I've been on develop for a long time as well, but have more than once had to patch things. It feels more like alpha/pre-release quality to me than stable software.#2018-10-0408:43vijaykiranquite possible that my usage isnāt similar to others š it is emacs after all#2018-10-0408:43vijaykiranI think there is official gitter - perhaps folks there have better pic#2018-10-0408:44vijaykiranI remember whenever syl is on holiday it slows down a bit#2018-10-0408:44vijaykiranthis comes up pretty frequently - btw - https://www.reddit.com/r/spacemacs/comments/8awnhw/is_spacemacs_dying/#2018-10-0408:46practicalli-johnnyThere are several maintainers of the project who have been working on the 3.0 stable release, Spacemacs melpa and other aspects. There is a lot of interaction from the maintainers when raising issues and pull requests (that is my experience with the Clojure layer related pull requests).#2018-10-0408:47practicalli-johnnyIf someone posted on Reddit that something is dying it means that it has become mainstream. Many of the Clojure developers I know use Spacemacs for their daily work, as do I.#2018-10-0408:48practicalli-johnnyI've used develop branch for the last year and a half and the only issue I had was an org-mode package. A quick Google and someone had a fix already.#2018-10-0408:49plexusFound some good info in this thread about the current process https://github.com/syl20bnr/spacemacs/issues/8686#comment-302284122#2018-10-0408:50plexusDon't get me wrong I am absolutely not here to bash on Spacemacs or its maintainers, just trying to understand what the situation is.#2018-10-0408:51vijaykiran@plexus I didnāt take it as bashing at all š I know you, man#2018-10-0408:52plexusjust making sure, lots of people in this channel š#2018-10-0408:55plexusIt seems Syl has a policy of keeping the core team small, which sounds to me like setting themselves up for burnout. That said there seems to be some constructive discussion about process and policies so curious to see where it will go.#2018-10-0408:59vijaykiranlike clojure.core š#2018-10-0409:00practicalli-johnnyI can understand wanting to keep the core team small. They are building something quite unique on top of Emacs and so need to ensure the contributions continue to build on this work effectively. It's a similar approach taken by Clojure.core and on a larger scale, Linux kernel.#2018-10-0409:01practicalli-johnnyThere is perhaps more scope to add maintainers for specific language layers, although having a core maintainer shadow them would be appropriate. #2018-10-0409:02practicalli-johnnyThere are several people here that have helped shape and test the Clojure layer and have had good support from the core maintainers.#2018-10-0409:05practicalli-johnnyI would love to see master be updated every 6 months to make the project look more active to the new user. However, thinking about all the interesting development and changes that go into all the hundreds (thousands) of packages out there, my own needs suit the develop branch rolling release far better.#2018-10-0409:07practicalli-johnnyThanks for sharing your concerns @plexus, it is good to discuss these to ensure we aren't complacent. I will put more effort myself into contributing back (as I am writing a book on Spacemacs, so want to see it continue to be successful)#2018-10-0409:09practicalli-johnny@plexus thanks for all the great contributions to the Clojure community, your efforts are much appreciated#2018-10-0410:01plexus> I am writing a book on Spacemacs
That's very cool! Also quite an undertaking, respect!#2018-10-0414:37practicalli-johnnyThank you @plexus. The book currently has a narrow focus on Clojure development with Spacemacs, but am steadily expanding the general workflows of Evil mode (as I learn them) so most should apply to other languages. Lots of great feedback of ideas from this channel and #clojure-uk and the London Clojure community. Work in progress of the book is here https://practicalli.github.io/spacemacs/#2018-10-0415:20kirill.salykinis it possible to fold/expand in spacemacs only on specific level? for instance fold all except 1 levels (top forms)?
similar to magit-show-section-level-1?#2018-10-0416:03practicalli-johnny@kirill.salykin have you discovered the fold transient state, SPC z . Or in Vim Normal state, the z keybinding shows a menu that contains the code folding commands#2018-10-0416:04practicalli-johnnyhttps://practicalli.github.io/spacemacs/navigating-code/code-folding.html#2018-10-0416:30kirill.salykinThanks!#2018-10-0416:32kirill.salykinBut I donāt see any levels mentioned there?#2018-10-0416:32kirill.salykinI can collapse/expand all...#2018-10-0416:33kirill.salykinIs it possible to collapse all except top level forms?#2018-10-0418:47practicalli-johnny@kirill.salykin not sure what you mean by levels. Code folding does what I expect, i dont know what (or why) you need anything different. We all have different tastes though, so should be easy to hack something by looking at the code.#2018-10-0418:48ag@kirill.salykin I guess you can write it yourself, shouldnāt be very difficult. But very often when I need something non-trivial, I soon find it that I actually donāt need that at all#2018-10-0418:49Mario C.I think he means
(defn my-fun [_] ;this is first level
(some-fn "arg1" .... :this is second level
));#2018-10-0418:50Mario C.I just go around folding functions in the way with z-c#2018-10-0418:50Mario C.I open a file and automatically do z-m#2018-10-0418:51practicalli-johnnywell then we would need to agree on what levels are because Mario, your first level is actually three levels potentially, the symbol for the function, the doc string (abscent) and the argument list#2018-10-0418:52practicalli-johnnyand what happens if you have sequential code forms in the top level expression. I get what you are asking, but this could be quite bespoke to the individual developer.#2018-10-0418:54practicalli-johnnyWith Org-mode, Markdown and Magit, then you already have levels. In Clojure it seems you would need to impose your own level semantic (or make that customisation so it fits different tastes). Or am I missing something completely.#2018-10-0418:56Mario C.https://marketplace.visualstudio.com/items?itemName=vikyd.vscode-fold-level#2018-10-0418:57Mario C.Hopefully this explains better visually what we mean by levels#2018-10-0418:57kirill.salykinYes, Mario perfectly explained what I meant#2018-10-0418:58kirill.salykinSimilar to what magit do when you press 1,2,3#2018-10-0419:06practicalli-johnnyI would suggest you just dont need that in Clojure because your functions are less complex (or should be). Most of my production code has function definitions that are only a few lines deep, so I have never considered folding any differently that the current way. Do you have any Clojure examples when you see an advantage in folding at different levels (and what should each level contain.
With languages that have more complex syntax and structure, then yes I can see the benefit.#2018-10-0419:08kirill.salykinFor instance defn let if do - 4 levels deep, and I wonāt consider it being complex#2018-10-0419:08kirill.salykinOr couple nested let #2018-10-0419:09kirill.salykinIt is not must have thing#2018-10-0419:10kirill.salykinBut sometimes seems handy)#2018-10-0420:21practicalli-johnny@kirill.salykin assuming you are using the default evil folding method, you could try origami instead. Edit your .spacemacs file and update dotspacemacs-folding-method 'origami. This adds a recursive open and close, and what it calls an org-mode header collapse (which is what I understand as your levels). Changing this setting will download the origami package, so I suggest restarting Emacs rather than just reloading the configuration.
I still believe you will need to teach the folding about the levels you want, by writing your own parser. The https://github.com/gregsexton/origami.el website has some basic details#2018-10-0420:35agorigami works fine for some languages. but it sucks for others. same thing can be said about evil-fold. I wish there was an easy way to configure these for different modes#2018-10-0421:27practicalli-johnnyThere is also https://github.com/mrkkrp/vimish-fold/blob/master/vimish-fold.el which some have commented to be really good for everything, however, I dont think this has been added to Spacemacs. I am trying out Origami now, but it seem less useful for Clojure than evil-fold, as folding seems to only work at the top level. I could be doing something wrong, or the Clojure parser for origami needs tweeking. I would love to see the argument list still shown when folding, as an example.#2018-10-0421:37practicalli-johnnyIf anyone wants to try the evil-vimish-fold, you can add it to your .spacemacs file as follows
1) add the package name evil-vimish-fold to dotspacemacs-additional-packages
2) add (evil-vimish-fold-mode 1) to user-config#2018-10-0503:37Mario C.I am having issues installing spacemacs. I get File is missing: Cannot open load file, No such file or directory, bind-map#2018-10-0503:42Mario C.Fixed by starting emacs with --insecure#2018-10-0503:38Mario C.In the installation message buffer I get Package ws-butler is unvailable. Is the package name misspelled?#2018-10-0503:38Mario C.And it just hangs there#2018-10-0509:51practicalli-johnny@mario.cordova.862 are you still running with emacs --insecure?
There is also a setting in .spacemacs to us only http to connect to melpa.
If ws-butler is an install from Github rather than an elpa install, there may be something broken with your git install or git needs to be configured to work with a proxy (assuming you are installing Spacemacs in a network behind a proxy)#2018-10-0515:31Mario C.I ran emacs --insecure and it pulled all the packages and afterwards I was able to start emacs regularly without the --insecure flag.#2018-10-0516:31practicalli-johnny@mario.cordova.862 the setting dotspacemacs-elpa-https t in dotspacemacs/init section of .spacemacs gives you the same results as emacs --insecure once Spacemacs is installed.#2018-10-0516:56Mario C.But wouldn't that always start spacemacs as insecure if I set that setting to that?#2018-10-0520:03practicalli-johnny@mario.cordova.862 yes, but it just means you are downloading packages from elpa over http rather than https. Otherwise it makes no difference to the rest of emacs.#2018-10-0523:29Mario C.I see well its working just fine so will leave it as it but will keep this in mind just in case it appears again.#2018-10-0509:54practicalli-johnnyOr it could be just a broken download of the elpa package, in which case you should check under the .emacs.d/elpa directory (in the relevant sub directories for Emacs version and Spacemacs branch) and delete the relevant package. Restart Emacs and it will try and download the package again.#2018-10-0513:47plexusFYI https://github.com/syl20bnr/spacemacs/pull/11397#2018-10-0514:03practicalli-johnny@plexus thanks. I though I spotted a whitespace bug, but just me reading the diff incorrectly, sorry.#2018-10-0514:05practicalli-johnnyThe CircleCI tests are failing where you have a space between the org-mode header and the content in the http://readme.org. Seems a bit picky, but easily fixed.#2018-10-0514:40practicalli-johnny@plexus a matter of style perhaps, but I put additonal layer config under the :variable name
(clojure :variables
clojure-enable-sayid t
clojure-enable-clj-refactor t)
Just wondering if this is my convention or if everyone does it this way. I think most of examples I've seen are like this.#2018-10-0523:29Mario C.By any chance does spacemacs have a way to sort my buffers in alphabetical order?#2018-10-0523:30Mario C.that way I can do SPC b n and know my files will be going a -> z#2018-10-0523:30Mario C.and SPC b p is going z -> a#2018-10-0523:30Mario C.alphabetical order based on file name that is#2018-10-0523:31ag@mario.cordova.862 use iBuffer#2018-10-0601:39practicalli-johnnyI used to use ibuffer list and configured it do all sorts of fancy stuff, like order buffers into categories and actually show longer buffer names without truncating them.
Now I simply use the fuzzy logic built in to helm to find the right buffer, I find it so much quicker and easier than scanning or searching the list. I also use layouts, SPC l which only shows me buffers relevant to each layout with SPC b b. I find ibuffer limited now (and more importantly I forgot how to configure it so I can read longer buffer names)#2018-10-0721:11ag@jr0cket Yeah I don't use iBuffer very often, but sometimes it comes handy for use cases like @mario.cordova.862 had.
For example if you need to show all the buffers associated with unsaved files you can introduce a custom iBuffer filter
(define-ibuffer-filter unsaved-file-buffers
"Toggle current view to buffers whose file is unsaved."
(:description "file is unsaved")
(ignore qualifier)
(and (buffer-local-value 'buffer-file-name buf)
(buffer-modified-p buf)))
(define-key ibuffer-mode-map (kbd "/ u") #'ibuffer-filter-by-unsaved-file-buffers)
#2018-10-0912:18kirill.salykinis it possible to truncate long lines (SPC t l) globally and always?#2018-10-0912:18kirill.salykinnot per buffer#2018-10-0912:19kirill.salykinand if possible - how? š
thanks#2018-10-0915:04practicalli-johnny@kirill.salykin I believe so, although havent tried it. There are a few ways you can add this to the dotspacemacs/user-config section of .spacemacs
Set global visual line mode to true, this wraps lines and is a minor mode around truncate lines
(setq-default global-visual-line-mode t)
I use the following which works for org-mode:
;; turn on visual-line-mode for org-mode only
(add-hook 'org-mode-hook 'turn-on-visual-line-mode)
You may have to reload your configuration or restart Spacemacs for this to be picked up#2018-10-0915:06kirill.salykinnope, doesnt work#2018-10-0915:20practicalli-johnnyI cant help with this minimal response, sorry.#2018-10-0915:21kirill.salykinnothing happened, no errors
and lines not truncated#2018-10-0915:22kirill.salykinIād like to provide as much as possible, but donāt actually know what else I can tell#2018-10-0915:45practicalli-johnnywhat modes are not truncating lines?
do the lines truncate in those modes manually ?
are you using horizontal splits in your windows?
are you using master or develop?
did you reboot after changing the config?
did you try both forms of config suggested?#2018-10-0916:58ag@kirill.salykin maybe try (add-hook 'prog-mode-hook 'spacemacs/toggle-visual-line-navigation-on)#2018-10-0921:14kirill.salykin@U05254DQM sorry for delay:
- clojure mode
- yes, when manually toggle - it truncates
- no, not horizontal, but vertical
- develop
- yes, I reboot
- yes, both#2018-10-0921:16kirill.salykin(add-hook 'prog-mode-hook 'spacemacs/toggle-truncate-lines-on)
worked for me
thanks @U05254DQM and @U0G75ARHC#2018-10-0923:20practicalli-johnnyI've never needed to truncate lines / visual-line when writing Clojure, or any other programming language so apologies for not understanding what you were trying to do. Thanks @U0G75ARHC, that is how I would do it.
I've only used it for org-mode, hence the example. I usually switching it off when creating wide tables in org-mode.#2018-10-1006:20kirill.salykinNo need to apologize. Thanks a lot for your help! And yeah, our code should be a bit shorter)#2018-10-1013:01practicalli-johnnyI tend to avoid longer lines in Clojure code as personally I find it easier to read Clojure that way.
Spacemacs does a good job of auto-indenting, more so in vim insert mode though. And TAB is always handy for tweaking the indents on lines or regions.#2018-10-1015:45kirill.salykinbut sometimes 2 vertical windows side-by-side on 13" cant fit allā¦#2018-10-1015:46kirill.salykinI agree with your points!#2018-10-1016:03practicalli-johnny@kirill.salykin have you tried using golden ratio, SPC t g. it will automatically make the active buffer bigger relative to the other windows you have open. when you switch buffers then the new active buffer becomes bigger. For an example, see https://github.com/roman/golden-ratio.el
Golden ratio is already part of Spacemacs, so nothing to install.#2018-10-1105:01kirill.salykinThatās good one, thanks!#2018-10-1013:08practicalli-johnnyThe latest develop branch now has sayid debugger and clj-refactor as optional features, which are not included by default. This should make running the Clojure REPL a little lighter on resources.
If you want to have these features on by default, its a simple change to the Clojure layer in the .spacemacs file. Rather than just clojure, add variables for each of the features you wish to enable (`t` for true)
(clojure :variables
clojure-enable-sayid t
clojure-enable-clj-refactor t)
My enhanced Clojure setup is defined here: https://practicalli.github.io/spacemacs/install-spacemacs/enhance-clojure-experience.html#2018-10-1121:25eggsyntaxAnyone know offhand how you open the basic SM menu in holy-mode? Trying to help a colleague get started.#2018-10-1121:44mccraigmccraig@eggsyntax iirc it's <alt-m>#2018-10-1121:45mccraigmccraigi've changed it to <alt-spc> which i like much better#2018-10-1121:48eggsyntaxThanks!!#2018-10-1211:50prncHi! has anyone encountered a problem with spacemacs + cider where after pressing key combo (e.g. ,ee) you need to press a movement key to actually see the evaluation results?#2018-10-1212:47practicalli-johnny@prnc haven't noticed that problem. Do you get the same for , e f or , e ;#2018-10-1214:29practicalli-johnnyIf you are using a custom theme, it may be a slow down due to font locking, but cant thing of anything else. Or if you are using Emacs 26 or 27 their may be some issue. But I am just guessing now.#2018-10-1311:23prncthanks @U05254DQM, I think it happens regardless of theme, I will investigate this weekend and report back if I have any success with this, cheers!#2018-10-1308:00kommenIām taking some time to fix some annoyances and short comings with the Spacemacs und clojure/cider integration: https://github.com/syl20bnr/spacemacs/pull/11431#2018-10-1308:02kommenFeedback welcome and if you have any suggestions let me know #2018-10-1308:04kommenI still have https://github.com/syl20bnr/spacemacs/issues/4124 on my list, since this bugs me often#2018-10-1312:30practicalli-johnny@kommen thanks for submitting a pull request, looks very useful. I an unsure about using RET to send input to the repl. Is this just working in the REPL history buffer, in which case that sounds good. If its in the normal REPL buffer, then RET would stop you entering a multi-line expression on the repl. In that case C-RET seems more appropriate.#2018-10-1312:36kommen@jr0cket I just added RET in normal mode to behave the same as in input mode and match the original cider implementation: https://github.com/clojure-emacs/cider/blob/6d6aa42ecf5bad9110cc0a781e7786b87812b624/cider-repl.el#L1592 . right now in spacemacs RET would do nothing as it tried to navigate to the next line in normal mode, but in the repl youāre already on the last line.#2018-10-1312:37kommenC-RET is already bound to cider-repl-closing-return#2018-10-1312:39practicalli-johnnyI am just experimenting with the repl-history. Currently it is definitely confusing to have to switch to vim insert mode to call the buffer history and again switch to vim insert.#2018-10-1312:41practicalli-johnnyI would like to have SPC s h keybinding that opens a buffer with repl history in vim normal mode, which i can navigate quickly between each expression in that history and press RET to push that expression back into the REPL buffer#2018-10-1312:42practicalli-johnnyfor bonus points you could evaluate the expression just pushed without having to go into vim insert mode#2018-10-1312:42practicalli-johnnyI am just trying to define what I think would be useful, as I look at what you have suggested.#2018-10-1312:46practicalli-johnnyIt would be nice to have different keybindings, one that quits the history after you send the expression (so this is what SPC or RET currently does in vim insert mode), the other that keeps the repl history open.#2018-10-1312:50kommenI donāt use the repl history often, as I mostly use M-p to navigate back, I didāt try yet to customize it#2018-10-1312:51kommenbut Iām not sure about your comment regarding RET in normal mode preventing multi line input: multi line input doesnāt work right now with RET, so it is not preventing anything I think#2018-10-1312:52kommentalking about the repl buffer, not the repl history#2018-10-1312:52practicalli-johnnyoh yes, you are correct. It shows how little i use the repl buffer directly..#2018-10-1312:57practicalli-johnnysorry, slow on the uptake today. So the RET is for vim normal mode, so you can evaluate an expression in the repl buffer without having to go into vim normal mode. if thats right, then you have my full support#2018-10-1312:58kommenyes, this is exactly what I wanted to achieve and what my change does#2018-10-1312:59kommenno worries, I just want to make sure weāre on the same page and I have somehow a different setup to not waste time on fixing non-issues#2018-10-1313:04practicalli-johnnyjust one final query, the P leader key for repl-history, does that mean i can press P in vim normal mode in the repl buffer and it pops up the repl history ? Or have i misunderstood#2018-10-1313:07kommenyou have to press , P in normal mode in the repl buffer#2018-10-1313:12practicalli-johnnyah, so its added to the major mode menu at the top level. I like that, however, my own preference would be , s h for major-mode > cider > history. I am not sure how P means history in a mnemonic way, unless it is for Previous? If P is used in cider itself, then I am okay with that.#2018-10-1313:16practicalli-johnnyor if you wanted a root history, how about using a meaningful symbol, as is used to start the repl. so you could have , s h and , < which both call the repl-history#2018-10-1313:16kommenin cider it is C-c M-p#2018-10-1313:17kommenhttps://github.com/clojure-emacs/cider/blob/6d6aa42ecf5bad9110cc0a781e7786b87812b624/cider-repl.el#L1621#2018-10-1313:26practicalli-johnnyI prefer , s h and , < as to me it fits into the existing Spacemacs keybindings and mnemonic menu approach. I would be interested to hear from others as to what they prefer. Maybe @ag has some thoughs as they have customised Clojure layer more than myself.#2018-10-1313:27practicalli-johnnyI really appreciate you doing this work though, it really will make using the REPL buffer and history much easier.#2018-10-1313:33kommenI can see , s h be usefull, especially if somebody would want to eval form again, they wouldnāt need to switch to the repl buffer first to get to the history#2018-10-1313:37kommenwill wait for further feedback then#2018-10-1313:37kommenand thanks for your feedback!#2018-10-1320:57Daniel Hines@jr0cket, your book has been super helpful. It's helping me get a handle on all the stuff I knew was there but had never tried. Thanks!#2018-10-1320:58Daniel Hines(FYI I finally got joker working. The package exec-path-from-shell seems to have fixed it (and a bunch of other problems too!))#2018-10-1323:26practicalli-johnny@kommen just trying out your pull request as a branch and noticed that RET is not working in the REPL buffer. I think n and p navigation would be good to have too.
I opened a clojure source file and started the REPL. I opened the REPL buffer with , s s. Whilst still in Vim normal mode I used , P to open a buffer with the REPL history. That all works very well.
I cant jump to each expression (as you can with n and p in vim insert mode). However, I can press RET to send the current expression to the REPL buffer and close the REPL history.
With the cursor back in the REPL buffer in Vim normal mode, RET doesnt make the expression evaluate in the REPL buffer, it does nothing. If I switch to Vim insert, i, then of course I can evaluate the expression. I've tried a few examples and it seems something is missing. I'll take a look tomorrow.#2018-10-1413:49practicalli-johnny@kommen I just saw an example of multi-line editing in the REPL in the #emacs channel, so considering a pull request that does the equivalent of this, but defined in the usual keybinding form in the Clojure layer. RET creates new lines and indents, C-RET evaluates the expression. This works the same way in other tools, eg. Atom, VSCode, LightTable, rebelreadline, etc
(define-key cider-repl-mode-map (kbd "RET") #'cider-repl-newline-and-indent)
(define-key cider-repl-mode-map (kbd "C-<return>") #'cider-repl-return)
#2018-10-1419:18kommen@jr0cket Iāll recheck the RET behaviour in my pull request. it works on my machine:tm:. but iāll make my colleagues try it as well.#2018-10-1419:20kommenI considered the repl behaviour like you suggest, but I think the main reason why cider by default has RET mapped to cider-repl-return is that people are way more likely type single line forms in the repl than multi line forms#2018-10-1419:21kommenfor multi line forms, having them in buffers and eval them there is a much better way anyway#2018-10-1419:22kommencider has cider-repl-newline-and-indent on C-j, which is shadowed by in spacemacs by cider-repl-next-input unfortunately#2018-10-1419:23kommenIād rather much more like to come up with an intuitive alternative for that#2018-10-1420:17kommen@jr0cket but I think we still should discuss this with the spacemacs maintainers. care to file an issue about this? would be interesting to know if they want to be closer to ciderās default behaviour or closer to other editor implementations#2018-10-1516:31practicalli-johnny@kommen yes will raise an issue or pr about the multi-line repl. Thinking this could be either a command you can toggle or a :variable on the Clojure layer itself, with the default to be the current single line expression. That would give easy access to those who wished to have a multi-line repl, but not force it on others who are used to single line.#2018-10-1516:41practicalli-johnnyIt seems like your original pr would benefit from a complete replication of the vim insert commands available in the REPL history buffer available in vim normal - https://cider.readthedocs.io/en/latest/using_the_repl/#key-bindings#2018-10-1614:39achikinTo search project-wise I press /search_term, to reopen that search I press SPC s l. How can refine the search after pressing SPC s l?#2018-10-1623:36practicalli-johnny@U3A7Z18JZ it sounds like you are experiencing some kind of bug.
When I do a project search, SPC /search-term and then reopen the search with SPC s l I have a helm style popup where I can edit the search-term.
When you installed Spacemacs, did you change to the develop branch? Did you select Ivy instead of Helm? Not sure if thats related, but it would help to know.#2018-10-1705:00spfeifferSince when does / search in the project? i need to do SPC / for that?#2018-10-1708:58achikin@U05254DQM let's say I did the search and saw some results in helm popup, than I jumped to one of the results and changed it so it does not qualify for the search term any more. But then, when I press SPC s l - I still see that outdated search result. The question was how can I update the search result in helm-popup window?#2018-10-1708:59achikin@U067P1FT2 I'm sorry, I meant SPC / of course. Thank you.#2018-10-1709:00spfeifferAh okay. i thought i missed somethingā¦#2018-10-1711:21practicalli-johnny@U3A7Z18JZ I did a second project search after deleting the result of the first and the result was gone. I am using Helm and develop branch of Spacemacs, so perhaps you are experiencing an earlier bug or an issue with ivy.#2018-10-1711:23achikin@U05254DQM yes, I know when you redo the search - the result is gone. But when you just press SPC s l - the result is still there#2018-10-1711:25practicalli-johnny@U3A7Z18JZ oh yes, my bad. I get the same problem. Congrats you have found a bug š#2018-10-1711:26practicalli-johnnyalthough if I delete a character in the search-term then the search results in the popup buffer do update correctly#2018-10-1711:26achikin@U05254DQM it has been working for me like this for almost two years - since I started using spacemacs. Thank you, I'll report.#2018-10-1711:26practicalli-johnnyso I guess it caches the results and then searches again#2018-10-1711:27practicalli-johnnyare you not able to change the search-term ?#2018-10-1711:27practicalli-johnnythe command does say resume, so am not sure if it is a bug or just the way you interpret what resume does#2018-10-1711:27achikin> although if I delete a character in the search-term then the search results in the popup buffer do update correctly
Yes, this is how I update the search right now, but it's a bit confusing. I thought there is a hidden hotkey that I don't know that updates the search.#2018-10-1711:28practicalli-johnnycertainly encourage you raise this as an issue and suggest how you would like to improve this#2018-10-1720:07achikin@U05254DQM C-c C-u does the trick. It is bound to helm-refresh#2018-10-1811:58spfeifferWell, might be an intended behaviourā¦It just redisplays the previous search result to continue working in it. Might be performance reasons to not automatically redo the search.#2018-10-1620:13Nikita VasilchenkoHi! I have a trouble with cider. Error occurring in repl buffers when I execute cider-jack-in command
https://clojurians.slack.com/files/UCRM55BKM/FDFCF9RUL/screen_shot_2018-10-16_at_21.39.23.png#2018-10-1623:30practicalli-johnnyHello @UCRM55BKM unfortunately the repl-server log lines are truncated, so its hard to see the full details of the message.
Can you confirm if you are using the develop branch and if so, which commit (or when did you last pull commits). The commit that removed sayid is only 7 days old.
If you can run Spacemacs without Sayid at all, then this may fix the issue (assuming Sayid is the root cause)#2018-10-1703:22Nikita VasilchenkoIām using the master branch#2018-10-1703:28Nikita Vasilchenkohttps://pastebin.com/DSAzCd9b#2018-10-1704:20Nikita VasilchenkoHmm. After few manipulations with .spacemacs I got helm-M-x: The boot executable isn't on your 'exec-path' but I have reinstall spacemacs and continue getting this error.#2018-10-1711:45practicalli-johnnyIt seems the most likely cause of your original nrepl-server is an incompatible JVM. Maybe your profile and rc files have different JVM versions set. https://github.com/clojure-emacs/orchard/issues/20#2018-10-1711:46practicalli-johnnyCan you confirm you only have Java 8 or OpenJDK 8 installed?#2018-10-1713:02practicalli-johnny@UCRM55BKM For boot, you can check all your environment variables using SPC f e e. Try changing where you define the PATH for boot in your dot files for your OS.#2018-10-1719:57Nikita VasilchenkoHello, Iām really appreciate your attention. Iām trying to digging in this direction. Thank you. Iāll write when found solution.#2018-10-1720:16Nikita VasilchenkoI have reinstall emacs-plus by brew and pull spacemacs. And everything works fine. Thank you very much for your participation)#2018-10-1722:24practicalli-johnnyGreat to hear. Feel free to ask more questions you have in the #spacemacs channel. I am also writing a book on Spacemacs and Clojure, which may be of some use https://practicalli.github.io/spacemacs/#2018-10-1909:26practicalli-johnnyI am working on a screencast for Vim editing techniques that are common for developers, e.g. simple transpose x p, change word c w, change region v (select) c, comment line g c c, comment region v (select) g c, delete word d w, delete to end of line d $, surround with [] without spaces v s ] , change surrounding ( to [ c s ( [, transpose words M-t (that may be Emacs keybinding), multi-replace with iedit and narrowing.
Any editing techniques you use? Or things you wish you could do easily?
Thanks#2018-10-2200:01euccastroD also deletes to end of line#2018-10-2200:03euccastroI use c i o to change a whole symbol. it works even if you're not at the beginning of the symbol#2018-10-1909:47jahsonchange in ( c i (, change āaroundā ( c a (#2018-10-1910:16shanyeah I like the {c|d} {i|a} <{w | ( | [ }> type of modifying#2018-10-1910:18shanalso Iāve looked at a few chapters of
https://pragprog.com/book/dnvim2/practical-vim-second-edition
a while ago and it seemed really good.
I really need to dedicate time to improving though š#2018-10-1912:25kirill.salykin@jr0cket maybe instead of delete word d w`` you want something like d i|a w?#2018-10-1912:25kirill.salykindelete to end of line d $ = D?#2018-10-1912:26kirill.salykinsame for change word?#2018-10-1912:26kirill.salykinbecause d w will detele till end of word. not the word itself#2018-10-1913:03jeff.terrellI often surround things with y s <character> <motion> instead of v ....#2018-10-1913:04jeff.terrellRelatedly, I use the % motion a lot. (Scan forwards for next paren/bracket/brace and then jump to its match.)#2018-10-1913:06jeff.terrellAlso most vimmers I know somehow don't know about the {/`}` motions (jump to next/prev empty line), which I use all the time. Makes rearranging paragraphs and such really easy too. For example, { d } { P will swap the current paragraph with the preceding one.#2018-10-1913:08jeff.terrellOne more that should be an integral part of every vimmer's toolbox, but rarely is IMO, is . (the repeat operator). You have to use vim a certain way (I would argue the right way, e.g. without arrow keys in insert mode) to make good use of it. But there's so much power there.#2018-10-1913:10kirill.salykinAlso cool thing you can combine d | c | v | r with ace jump#2018-10-1913:12jeff.terrellAnother couple I just thought of because I used them are the W/`B` motions, which are like the lowercase versions except they jump between whitespace-delimited words only. Surprisingly useful.#2018-10-1913:23kirill.salykinE/e#2018-10-1913:23kirill.salykinJumps to the end of the word#2018-10-1914:39practicalli-johnnythese are all excellent suggestions and helping make more use of Vim, feel free to keep sharing if you have them.#2018-10-1914:40jeff.terrellOK. > and < (indent and dedent) operators, which are also useful with the aforementioned }/`{` motions.#2018-10-1914:40jeff.terrell= (code-aware indenting) operator. Nice with the ap (a paragraph) text object.#2018-10-1914:41practicalli-johnnyI've started defining a page about how to think in Vim https://practicalli.github.io/spacemacs/spacemacs-basics/speaking-vim.html#2018-10-1914:41practicalli-johnnyand an every growing quick reference... but its tricky to learn all these at once š https://practicalli.github.io/spacemacs/spacemacs-basics/vim-quick-reference.html#2018-10-1914:44jeff.terrellI like using zt, zz, and zb to pull the current line to the top/middle/bottom of the screen.#2018-10-1914:44jeff.terrellAnd SPC v in Spacemacs is nice to select whatever you're at. You can repeat v at that point to widen the selection to the next biggest thing, etc.#2018-10-1914:49jeff.terrellzc and zo are useful to close and open folds, which can be a nice way of focusing on certain pieces of code.#2018-10-1915:01practicalli-johnnyTalking of code folds, anyone have preference over vim or origami style folds in Spacemacs. I think I am leaning towards vim style.#2018-10-1915:22jeff.terrellI never really tried to use origami style, but vim-style is what I cut my teeth on and I'm comfortable with them.#2018-10-1919:42jeremyI am trying to use define-key to remap some keys in cider-repl-mode-map and I'm having a hard time to get spacemacs to load it on startup. Maybe I am not putting it in the right place. Inside of dotspacemacs/user-config I have the following
(progn
(require 'cider-repl)
(define-key cider-repl-mode-map (kbd "RET") #'cider-repl-newline-and-indent)
(define-key cider-repl-mode-map (kbd "C-<return>") #'cider-repl-return))
If I evaluate it manually it works, but it does not change the key binding when spacemacs loads. Any ideas?#2018-10-1919:44practicalli-johnny@jeremy642 you should use a hook.. let me dig out an example#2018-10-1919:45practicalli-johnny(add-hook 'cider-repl-mode-hook
'(lambda ()
(define-key cider-repl-mode-map (kbd "<up>") 'cider-repl-previous-input)
(define-key cider-repl-mode-map (kbd "<down>") 'cider-repl-next-input)))
#2018-10-1919:46practicalli-johnnyYou can of course call a separate function rather than using the lambda#2018-10-1919:46jeremyOh that one is actually useful too. Thanks š#2018-10-1919:46jeremyLet me give it a shot.#2018-10-1919:47practicalli-johnnyThe hook will run when you first enter the cider-repl-mode. You should just be able to evaluate .spacemacs and try it out in a new REPL.#2018-10-1919:48practicalli-johnnyI assume you are also putting the code inside the dotspacemacs/user-config function#2018-10-1919:48jeremyYep#2018-10-1919:52jeremyThat didn't work. I loaded a new repl and ret evaluates. Up and down just move the cursor.#2018-10-1919:57practicalli-johnnyInteresting, I used the same code a few weeks ago and it worked.#2018-10-1919:58jeremyGoing to reload emacs. I ended up trying to eval it, run a new repl and it worked. So I'm getting confused on what's working and what's not.#2018-10-1919:58jeremyš#2018-10-1920:02jeremyOkay I got it.#2018-10-1920:03jeremyI had an error in my user-config that I didn't notice.#2018-10-1920:03jeremySo I don't think it was evaluating the user-config properly.#2018-10-1920:04jeremyThanks for the help.#2018-10-1920:08practicalli-johnnyGreat. I am still investigating if this should be the default behaviour for the REPL buffer, with RET allowing multi-line editing and C-RET being evaluation. It seems quite a few people are setting this in Spacemacs/Emacs#2018-10-1920:11jeremyWhat I'd like is that if I am inside of the outer sexp then newline in the sexp I am in, if I am outside of the outside sexp then evaluate.#2018-10-1920:11jeremyMaybe too complicated? I don't know. haha#2018-10-1920:13jeremyI will play with the new keybinding to see how comfortable it feels to evaluate on C-Ret after some time with it.#2018-10-2118:14mathpunkAnyone here experimented with spiral-mode? The repl it opens looks really great, but I suck so bad at emacs/spacemacs internals, that I open it, go "oooh," find myself unable to send a form with ,se, panic, and run back to cider š#2018-10-2205:14kommen@mathpunk I have spiral installed and occasionally use it. though I too use cider for most of the time, Iām a big fan of the unrepl approach. I mostly use spiral to connect to already running instances where injecting nrepl tooling is not possible#2018-10-2215:20mathpunk@kommen :thinking_face: So, you have an ns in your application somewhere that runs a repl, and you connect to it over a network somehow?#2018-10-2216:25kommen@mathpunk yes, just instead of having an ns which launches the repl, we use the -Dclojure.server flag when starting the instance as documented here: https://www.clojure.org/reference/repl_and_main#_launching_a_socket_server#2018-10-2216:29mathpunkThank you, I knew this was possible but wasn't sure where to start reading about it. Just to make sure I understand, you use spiral to connect --- your editor is the client--- much like the example connection is made by telnet. Have I got that right?#2018-10-2216:30kommenyep, thatās right#2018-10-2315:02Mario C.I came across this#2018-10-2315:02Mario C.https://github.com/clojure-emacs/cider/issues/744#issuecomment-376742771#2018-10-2315:02Mario C.To run a REPL with a certain profile.#2018-10-2315:03Mario C.Where would I add this function?#2018-10-2315:03Mario C.In my .spacemacs file? SPC f e d?#2018-10-2316:29jeff.terrellSure. In dotspacemacs/user-config would be fine @mario.cordova.862.#2018-10-2316:29jeff.terrellYou might want to put it in a (with-eval-after-load 'clojure-mode ...) block.#2018-10-2316:30jeff.terrellAnd once you defined the function you could also say something like (spacemacs/set-leader-keys "ocr" 'start-cider-repl-with-profile) to get a Spacemacs-friendly key binding.#2018-10-2316:41Mario C.@jeff.terrell When I run the function, implemented as is, I get :
wrong number of arguments passed in (1 . 1), 0#2018-10-2316:42Mario C.I believe it is in reference to (cider-jack-in)#2018-10-2316:53jeff.terrellOk. Does SPC h d f cider-jack-in tell you anything?#2018-10-2316:55Mario C.Yea it tells me it needs one argument PARAMS and the example above it just being called as (cider-jack-in)#2018-10-2316:55Mario C.But I tried (cider-jack-in cider-lein-params) but that didn't solve it#2018-10-2317:07jeff.terrellThis is rapidly getting beyond my understanding of elisp. simple_smile But I bet folks in #emacs and/or #cider could help, especially if you leave out the Spacemacs-specific stuff and just focus on getting that function working, invoked from M-x start-cider-repl-with-profile.#2018-10-2317:08Mario C.Thanks man! I am just setting it manually right now#2018-10-2318:50Mario C.How to keep two windows from mirroring?#2018-10-2318:52Mario C.As in, I have two windows open with the same file. Id like to keep window 2 at a certain position while have window 1 at another. Anything I do (in terms of navigating) in window 1 doesn't reflect in window 2.#2018-10-2319:00aguse indirect buffers. #2018-10-2319:00agclone an indirrect buffer, they would act like separate things, but still save into the same file#2018-10-2320:32Mario C.@ag Thanks!#2018-10-2716:40Mario C.Any good videos/tutorial for learning how to use the debugger in CIDER on Spacemacs?#2018-10-2803:23practicalli-johnnyI only collated a few of the resources already there for said debugger. https://practicalli.github.io/spacemacs/debugging/sayid-debugger.html
Take a look at the cider inspector tool as well because you don't always need a full debugger
https://practicalli.github.io/spacemacs/evaluating-clojure/inspect.html#2018-10-2723:42jeff.terrellNot that I know of, but I'd probably watch/read something about that.#2018-10-2803:23practicalli-johnnyI only collated a few of the resources already there for said debugger. https://practicalli.github.io/spacemacs/debugging/sayid-debugger.html
Take a look at the cider inspector tool as well because you don't always need a full debugger
https://practicalli.github.io/spacemacs/evaluating-clojure/inspect.html#2018-10-2800:16tbrookeI have Mojave Spacemacs 0.200.13 Emacs 26.1 leinigen 2.8.1 Clojure 1.9 and I get this with coder-jack-in: (anybody else have this or have suggestions)
error in process sentinel: Could not start nREPL server: /usr/local/bin/lein: line 72: basename: command not found
/usr/local/bin/lein: line 103: mktemp: command not found
/usr/local/bin/lein: line 122: java: command not found
/usr/local/bin/lein: line 144: rm: command not found#2018-10-2800:58jeff.terrellThere's a problem with your PATH in Emacs somehow. Are you launching emacs via GUI or via command line?#2018-10-2801:05tbrookeCommand line#2018-10-2801:21jeff.terrellIn the same command line environment, if you echo $PATH, do you see (in the :-delimited entries) anything for /bin or /usr/bin? That's where those binaries should be. You can echo $PATH | perl -pe 's/:/\n/g' for better readability.#2018-10-2801:44tbrookeIt is there I have /bin /usr/bin and usr/local/bin java (1.8.0_81-B13) is at /usr/bin and I can load lein repl from the terminal in Emacs and connect but of course cider-jack-in is easier -#2018-10-2802:35jeff.terrellNot sure if this will be helpful, but maybe check your *Messages* buffer for any messages related to the path. I would think that when launching emacs from the CLI it would inherit its environment from the shell, but I don't know for sure. For example, I see a message like the following, although it doesn't affect my ability to cider-jack-in:
> You appear to be setting environment variables ("PATH") in your .bashrc or .zshrc: those files are only read by interactive shells, so you should instead set environment variables in startup files like .profile, .bash_profile or .zshenv. Refer to your shellās man page for more info. Customize āexec-path-from-shell-argumentsā to remove "-i" when done, or disable āexec-path-from-shell-check-startup-filesā to disable this message.#2018-10-2802:38jeff.terrellAlso, it might be worth trying to introspect the environment that emacs has. I'm not sure of the best way to do it, but one way might be to launch an eshell session (`SPC a s e`) and then echo $PATH to see what it reports.#2018-10-2802:38jeff.terrellWith that, I'm out. Good luck!#2018-10-2802:48tbrookeThanks#2018-10-2900:03jeff.terrellDid you figure out your issue?#2018-10-2904:54dangercoderAnyone else experiencing isssues with Cider? I somehow managed to destroy my config, reinstalled Cider and then when I try to jack-in-cljs It is stuck on "Pending".#2018-10-2904:56dangercoderSeems like SpaceMacs by default takes it packages from Melpa, maybe it would be better for me to use Melpa-Stable in order to not get surprises like this? š#2018-10-2908:39kommen@jarvinenemil Iām on latest spacemacs develop and latest cider from melpa and donāt have such issues#2018-10-2915:14dangercoder@kommen This is no longer an issue, I am unsure why it happened to begin with though. Might have been me updating a package which got it working again.#2018-10-2918:23dijonkitchenShould we be using the develop branch over master though? Seems like theyāre taking a while to merge updates into master.#2018-10-2918:34kommen@dijonkitchen I guess it depends on your usecase, which layers and which package repository you use#2018-10-2918:37kommenif everything works for you with master, then youāre all good. but bug fixes havenāt been merged from develop to master for a few month now, so i think it is fair to say, if you need things fixed (e.g compatibility with some new package version), youāre better off with the develop branch.#2018-10-2918:39kommennote though, while i try to contribute things back to spacemacs, Iām not speaking for the maintainers. they may have a different point of view. there has been some discussion about this recently here https://github.com/syl20bnr/spacemacs/issues/11352#2018-10-2918:39kommenah, I just see you already commented there š#2018-10-2919:00dijonkitchenThanks, just curious if thereās any pitfalls I should avoid with Clojure development in general. Iām working fine off of master so far.#2018-10-2919:15kommenI donāt remember why exactly I switched to the develop branch#2018-10-2919:18kommenI donāt know of any pitfalls for clojure development in particular with master, but Iāve used develop since over a year now without any major issues#2018-10-2922:21Andrea ImparatoI don't remember exactly what wasn't working with master but something was definitely broken. never had an issue with develop instead š #2018-10-2922:40practicalli-johnny@dijonkitchen for Clojure development, I strongly encourage the use of develop branch of Spacemacs until master is updated to version 0.300 (its still 0.200 at the moment). One of the biggest changes has been to make loading of the Said debugger optional (off by default) when starting a REPL. Sayid is a fantastic debugger, but if you are not using it then it does use more resources. There are a lot of little usability fixes that are not yet in master for the Clojure layer.
I've used develop for over a year and its what I'm basing my Spacemacs book on#2018-10-2922:52dijonkitchenThanks, Iāve looked through your guide. Iāll have to check it out. My gut just doesnāt trust development branches over master and making exceptions are no fun!#2018-10-3013:27practicalli-johnny@dijonkitchen I had the same concerns when I first started, but now there is such a difference between master and develop branches at the moment that my first advice for anyone having problems with Spacemacs is to upgrade to develop branch.#2018-10-3005:57spfeifferI switcher to develop for parinfer, which i like. And the new fast/lazy-loading of packages is also nice. Had absolutely no problems with develop so farā¦#2018-10-3013:56agI can attest to that. Been using develop for over 3 years. Major hiccups I got? Maybe 3 or 4. All were fixable within one hour. Mostly it wouldn't take me longer than 20 mins. Develop is very stable. Things that can make the whole config unstable are usually upstream updates - changes in the packages#2018-10-3023:23dijonkitchenSo you all just pull down the latest develop changes every so often?#2018-10-3100:57agyup.. pull down... then run git log ORIG_HEAD..HEAD to see what's changed#2018-10-3103:01practicalli-johnny@jarvinenemil you should always update your .spacemacs file from the template after pulling changes.
SPC f e D will run ediff against your .spacemacs file and the template. I copy everything from the template apart from settings I know I have changed#2018-10-3103:07practicalli-johnnyI update from within Spacemacs by opening a file from .emacs.d, usually the readme file.
SPC g s to open Magit client, F to bring up the pull menu, -r to set rebase to true, o to pull from origin. Then I restart Spacemacs with SPC q r.
Then I update the .spacemacs file from template. And then update packages from the link on the Spacemacs home buffer SPC b h#2018-10-3104:48dangercoderThank you for the advice š#2018-10-3117:45Mario C.how to set lein parameters once?#2018-10-3120:59michaellindonwhat are the keybindings on a mac for slurping parentheses? On linux it always used to be ctrl plus an arrow key#2018-10-3120:59michaellindoni havent used spacemacs in a while#2018-10-3120:59michaellindonhas it changed?#2018-10-3121:05jeff.terrellIt hasn't changed ever AFAIK. Slurping the next form into the current parens is SPC k s. Lots of related structural editing things are under the SPC k menu.#2018-10-3121:05michaellindon@jeff.terrell good to see you still active! hope alls well in NC#2018-10-3121:06jeff.terrellGood to see you too man! All is well. I'm actually a prof at UNC CompSci now. Did you finish up at Duke? Will you be at the Conj this year?#2018-10-3121:06michaellindonoh thats awesome dude#2018-10-3121:07michaellindonso, I took a job as a senior data scientist at tesla. Been here for the last 5 months and haven't been able to use clojure#2018-10-3121:07michaellindonbeen forced to use python.... but now i have gained some leverage and im back to using clojure š#2018-10-3121:07jeff.terrellOoh, fantastic all around! Graduation, Tesla, and getting to use Clojure at work. Congrats!#2018-10-3121:08jeff.terrellWill you be at the Conj this year?#2018-10-3121:08michaellindonPRobably not š#2018-10-3121:08michaellindonsadly, i only get 15 days PTO at tesla, which includes sick days#2018-10-3121:08michaellindonright now i have 4 precious days#2018-10-3121:09michaellindonbut I'm going to be giving a talk at Duke in november#2018-10-3121:09michaellindonand im also giving a talk here: https://mlconf.com/events/mlconf-sf-2018/
ill be sure to plug clojure#2018-10-3121:09michaellindonive missed this community so much#2018-10-3121:10jeff.terrellThat's nice to hear. :-) Break a leg at your talks! Is the info for the talk at Duke posted yet?#2018-10-3121:12michaellindonnot just yet š I think its mostly an industry talk to masters students about doing data science in industry#2018-10-3121:12michaellindonnothing too fancy or academic š#2018-10-3121:12michaellindoni want to move back to NC#2018-10-3121:13jeff.terrellOh yeah? California not your thing?#2018-10-3121:13michaellindonno š i dont like it, its too hectic, and i had a better community of friends in NC#2018-10-3121:14michaellindoni plan to work here for a year and then look for something back in NC š#2018-10-3121:14michaellindonive actually got so much to talk about#2018-10-3121:14michaellindonmy team keeps talking about the need for an immutable database with a history of all changes, and i keep wanting to suggest datomic to them#2018-10-3121:15michaellindonim learning more about data engineering here, because it seems that in order to do data science i need to go out and collect and store the correct data#2018-10-3121:16michaellindonthe current data they have is terrible, because it gets mutated by humans and all previous values are lost. Sometimes the edits are incorrect, and the previous value was correct! š§#2018-11-0112:02jeff.terrellAh, sorry to hear you don't like the pace there. I know what you mean. I spent two summers in CA (Berkeley and San Diego) and, although it was fun for a summer, I decided I liked NC better. It does sound like the team needs Datomic, wow! Well, good luck with it all, and I hope you're able to find something good in NC. simple_smile#2018-10-3121:05spfeifferOops, i never updated the .spacemacs file after pulling fresh develop. I guess i was lucky thenā¦#2018-10-3121:06michaellindoni dont like SPC k s sometimes i need to slurp more than once#2018-10-3121:06jeff.terrellIf you need to do it more than once, I think you can say SPC k s s.#2018-11-0514:02kommen@U46LFMYTD > should also slurp#2018-11-0623:47michaellindon@U45J3R52L haven't found this to work. Are you using evil mode in spacemacs or straight up emacs?#2018-11-0623:48kommenevil mode in spacemacs#2018-11-0623:51kommenah, it might have work for me due do having this in my spacemacs/user-config:#2018-11-0623:51kommen(spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hooks)#2018-11-0623:56kommenthis enables evil-cleverparens-mode in lisp files which in turns maps > to evil-cp-> which slurps#2018-10-3121:07jeff.terrellBasically your cursor turns a different color (in my case purple) because you're in a structural editing transient state. I usually just escape out of it, but for repeated structural edits it can be a time saver.#2018-10-3121:07michaellindonoh ok, i need to forget some muscle memory. Hopefully this new way is more optimal :##2018-10-3121:07michaellindon:3#2018-11-0102:09nberger@michaellindon I have the following in dotspacemacs/user-config:
(define-key evil-normal-state-map "->" 'sp-forward-slurp-sexp)
maybe that's the arrow thing you were missing :)#2018-11-0113:34practicalli-johnny@spfeiffer https://www.youtube.com/watch?time_continue=752&v=fYsqaAL8HSU is an interesting video of Lisp State in general (skip to 12 minutes into the video).#2018-11-0216:31julianWhen using SPC / (smart search) - I often want to exclude a directory(s) from the search. I know about --ignore=directory pattern. Anyone know of a shorter version of this, and one that allows for multiple directories to exclude?#2018-11-0217:05ag@julian depending of what is the default search tool, you can set its arguments for the search.
e.g. if the first thing in dotspacemacs-search-tools set to rg, then you can ignore it in the glob, like that:
SPC / then gulp -g!node_modules - should search for āgulpā in all files but ignore paths that contain ānode_modulesā#2018-11-0217:09julianThat's exactly what I was looking for. Thanks! I thought my default was ag and was looking at the wrong docs.#2018-11-0217:13aghttps://twitter.com/iLemming/status/979241640769478657#2018-11-0423:02theeternalpulsedoesn't seem to work since I moved to ivy#2018-11-0500:23practicalli-johnnyDoes the Ivy layer in Spacemacs use counsel-rg package
https://oremacs.com/2017/08/04/ripgrep/#2018-11-0500:25practicalli-johnnyI assume ripgrep is still installed on your operating system, so assume that ripgrep either didn't get added to Ivy (or if it was then it's in a later commit to Spacemacs than you are running) #2018-11-0506:15theeternalpulseag worked with arguments fine when I was using helm.#2018-11-0512:18practicalli-johnnywhen you switch from helm to ivy, then search switches from helm-ag (which can use a number of search tools) to counsel. Given that there is discussion of counsel-rg as a package, I assume you would need that to use the same form of search switches in Ivy.
counsel-ag is not part of the Spacemacs Ivy layer https://github.com/syl20bnr/spacemacs/blob/master/layers/%2Bcompletion/ivy/packages.el#2018-11-0512:18practicalli-johnnyPerhaps the search tool used by counsel has switches that do similar things...#2018-11-0705:39theeternalpulseI switched to the rg and am liking it, the arguements aren't going through though for some reason.#2018-11-0705:39theeternalpulselike if I do -g*.test.js somestring#2018-11-0514:35PBSo - I finally upgraded to cidr 19 - From what I understand, I need to now use cider-jack-in-clj&cljs to start a clj and cljs repl simultaniously. However, when doing this my cider repl will no longer process anything I send it. I.e. (prn "AAA")#2018-11-0514:35PBHas anyone experienced this?#2018-11-0514:36PBIf I just use cider-jack-in-clj. My clj repl works fine#2018-11-0515:20plexus@kvit have a look at two REPL buffers, my guess is that your ClojureScript REPL didn't complete its upgrade process#2018-11-0520:10bfaySometimes when I eval something that throws an exception, my cursor is shot to the top of the buffer.
Is there a way to... not do that?
This only seems to happen with some of the things I eval. For example, if I eval a non-existing symbol, like awefijsd, the cursor goes to the top#2018-11-0520:11bfaybut if I eval that symbol inside of a sexp, like (awefijsd) the cursor stays where it should be#2018-11-0522:14plexusI've also noticed some weird cusror jumping when eval'ing stuff, not just to the top, but haven't been able to look into it yet.#2018-11-0614:11julianAny recommendations on choosing a backend for the Python layer? Anaconda vs Language Server Protocol.#2018-11-0715:12PBSo upon re-installing spacemacs. I've found that flycheck is no longer linting clojure. It is correctly linting bash scripts
It's installed
joker -v
v0.9.2
I have it set in my dotspacemacs/user-config
(require 'flycheck-joker)
(add-to-list 'flycheck-global-modes 'clojure-mode)
(add-to-list 'flycheck-global-modes 'clojurescript-mode)
I have syntax-checking enabled in the layers.
verify-setup says its' working:
Syntax checkers for buffer me.clj in clojure-mode:
edn-joker
- may enable: yes
- predicate: nil
- executable: Found at /usr/bin/joker
clojure-joker
- may enable: yes
- predicate: t
- executable: Found at /usr/bin/joker
Flycheck Mode is enabled. Use M-m u C-c ! x to enable disabled checkers.
--------------------
Flycheck version: 32snapshot (package: 20181018.1021)
Emacs version: 26.1
System: x86_64-pc-linux-gnu
Window system: x
#2018-11-0715:12PBCan anyone think of what might be wrong here?#2018-11-0718:46agyah, I've noticed that too.. frustrating#2018-11-0720:14gzmaskwhy are if-not and as-> does 3 spaces indent instead of 2? This is annoying as my co-workers all has 2 indenting in their editor, our PRs keep having indention wars. I can add (put-clojure-indent 'if-not 2) into my dot file, but thatās iffy.#2018-11-0720:58jeff.terrellWow, I never noticed that. I can't think of any reason why it would work that way.#2018-11-0720:58jeff.terrellI would either do the put-clojure-indent thing you mentioned, ask #cider, or look further in GitHub issues and the like to see if somebody's discussed this before.#2018-11-0721:41gzmaskFrustrating ⦠can I confirm that you all having the same indenting behavior?#2018-11-0721:42Mario C.How do I add a break point in a function? SPC m d b ?#2018-11-0721:43Mario C.That doesn't seem to work because when I call that function in my REPL nothing happens.#2018-11-0721:48practicalli-johnny@petr @ag I am using the clojure-lint layer with Spacemacs develop and linting seems to be working just fine with Joker. I am still on Emacs 25.3.50.2, but assume its not the version of Emacs that is the problem if it was working before.#2018-11-0818:24agI have updated things and hooray⦠joker works again⦠gosh⦠you get used to nice things and you start panicking when theyāre suddenly gone#2018-11-0721:49PB@jr0cket thansk for the response. Emacs is updated. I hope that's not the issue as I'm not sure exactly which version I was on before#2018-11-0721:52practicalli-johnnyI have Emacs 27 on an older laptop, so will set up Joker and give it a test to see if it works#2018-11-0721:52PBIt doesn't seem that that layer is available to me thoguh:
Testing settings in dotspacemacs/layers [[file:/home/peter/.spacemacs::dotspacemacs/layers][Show in File]]
** TEST: Each path in [[file:/home/peter/.spacemacs::dotspacemacs-configuration-layer-path][dotspacemacs-configuration-layer-path]] is a string
** TEST: Each path in [[file:/home/peter/.spacemacs::dotspacemacs-configuration-layer-path][dotspacemacs-configuration-layer-path]] exists in filesystem
** TEST: Each layer in [[file:/home/peter/.spacemacs::dotspacemacs-configuration-layers][dotspacemacs-configuration-layers]] can be found
*** PASS: html
*** PASS: ansible
*** PASS: colors
*** PASS: nginx
*** PASS: python
*** PASS: ruby
*** PASS: javascript
*** PASS: yaml
*** PASS: clojure
*** PASS: helm
*** PASS: auto-completion
*** PASS: better-defaults
*** PASS: emacs-lisp
*** PASS: git
*** PASS: markdown
*** PASS: org
*** FAIL: clojure-lint
#2018-11-0721:53PBOn the develop branch that is#2018-11-0721:54practicalli-johnny@petr sorry my mistake, you have to clone the layer first, then add the layer to .spacemacs. Details are on the github page https://github.com/n2o/clojure-lint-spacemacs-layer#2018-11-0721:57practicalli-johnnyIf you look in the packages.el file for that layer, they configure things slightly differently it seems.#2018-11-0721:57practicalli-johnny(defconst clojure-lint-packages
'(flycheck
flycheck-joker))
(defun clojure-lint/init-flycheck-joker ()
(use-package flycheck-joker))
(defun clojure-lint/post-init-flycheck ()
(add-hook 'clojure-mode-hook 'flycheck-mode))#2018-11-0721:57PBSo I downgraded flycheck-joker and linting is working again#2018-11-0721:57PBIt seems another package is broken š#2018-11-1005:57Candid@petr latest flycheck-joker won't work with joker v0.9.2 due to this change: https://github.com/candid82/flycheck-joker/commit/51e99e697761ee8dab863930910abdba7607c1bd I recommend updating to the latest joker (0.10.1) and then to the latest flycheck-joker#2018-11-1204:51PB@U75LX44UA Thank you. I'll put this on my list for tomorrow#2018-11-0722:01practicalli-johnnyOh dear. The last flycheck package I downloaded was version flycheck-20180907.1319 which seems to be working okay.#2018-11-0722:04PBI had 20181021.xxxx#2018-11-0722:04PBIts borked#2018-11-0722:05practicalli-johnnyGood to know, I'll keep an eye out for a new version before updating the packages, thanks.#2018-11-0722:09practicalli-johnny@mario.cordova.862 I have a breakpoint working (Spacemacs develop branch, with sayid package set to false). I put the cursor on the s of the str function call in the foo function definition. Then when I call foo with an argument, up pops the debugging options and the result of the expression (which I can interact with). It seems I can also inject values into the x argument of the str call). I am no expert at this, so this is just what I figured out.#2018-11-0722:11PBThanks for chiming in!#2018-11-0722:13Mario C.@jr0cket In order to run the debugger do I have to have the function call in the namespace?#2018-11-0807:06jumar@mario.cordova.862 you don't have to. It should work just fine if you call the function from the REPL.#2018-11-0822:22spfeifferI am hesitant to ask this, because i think it must be easy, but is there a way to tell Spacemacs āNo, i do not want to install ansible layer, and please do not ask me againā? I like Spacemacs offering me matching layers to files i open (i do not want to disable that completely), but not every time i open a yml fileā¦i am basically looking for a y)es, n)o, N)ever option instead of y/n#2018-11-0902:25agthere's an option in dotspacemacs. if you can't find it, maybe you need to update it to match the template. pull latest spacemacs, then press SPC feD#2018-11-0906:44spfeifferI can blacklist packages that i do not want to be asked for there? Thank youā¦#2018-11-0907:59agcheck the comments for this option https://github.com/syl20bnr/spacemacs/blob/master/core/templates/.spacemacs.template#L23#2018-11-1009:43spfeifferThank you, i will look into it again, but i understood it only allows global setting of automated layer installation, not blacklisting ony some layers?!#2018-11-0916:07jstokesanyone missing clj-refactor keybindings after updating spacemacs/packages?#2018-11-0916:30jstokesi changed back to master from develop branch spacemacs, and keybindings are back#2018-11-0916:53practicalli-johnny@jstokes you are actually missing the whole CLI-refactor package, as itās now turned off in develop by default. Enable in the develop branch of Spacemacs by providing a variable to the Clojure layer entry in .spacemacs
(clojure :variables
clojure-enable-clj-refactor t)
https://practicalli.github.io/spacemacs/install-spacemacs/enhance-clojure-experience.html#2018-11-1118:58aisamuOhhhhhhhhhh thank you so, so, so much. I thought I had screwed up the configuration files (again).#2018-11-0916:56jstokesaha, thank you @jr0cket#2018-11-0919:49practicalli-johnnyA pleasure. You may have noticed the same optional package for the sayid debugger too. Its the same kind of setting if you want to enable that package by default too.#2018-11-1616:41David RenoWhen a repl is started on a remote host and connected to, how does authentication work? Iām starting the remote repl this way: {:tag :a, :attrs {:href "/cdn-cgi/l/email-protection", :class "__cf_email__", :data-cfemail "64140d2416051714060116161d140d"}, :content ("[emailĀ protected]")}
When I disconnect and reconnect, I never need to enter username pi or the password. Maybe credentials are cached from previous connections? Spacemacs reports: [nREPL] Direct connection to 10.0.0.190:4000 established
#2018-11-1710:42practicalli-johnny@UBMFBEWKY I didnt think nrepl was a secure connection (I am no expert). My own understanding was you used a secure connection to tunnel the nrepl connection. Seems people use tramp or an ssl connection and then connect to the repl. I assume tramp connections are cached or tokens stored in a dotfile on your computer.
It would be interesting to know if this is correct.
I assume people in the #cider channel may know more#2018-11-1700:12Mario C.Is there any tool like kdiff built into spacemacs?#2018-11-1700:13Mario C.highlight sections in two buffers and have it show the differences in them#2018-11-1700:19practicalli-johnny@mario.cordova.862 is SPC SPC ediff what you are looking for? Ediff is also used for diffing your .spacemacs file with its template when you run SPC f e D#2018-11-1700:21Mario C.Does ediff allow me to check the differences in two different sections of the same file#2018-11-1700:24Mario C.I think it does#2018-11-1700:24Mario C.ediff-regions-wordwise#2018-11-1700:24Mario C.:thumbsup: @jr0cket#2018-11-1700:30practicalli-johnnyOh, interesting. Are you doing that kind of a diff for a merge conflict or something else. Had not thought of this before, so curious.#2018-11-1700:34Mario C.I have two sections with a set of rules. Some of them are equal thought it would be easier to just diff those two sections#2018-11-1700:34Mario C.Having trouble with some emacs commands. C-M-c is what exactly?#2018-11-1710:40practicalli-johnny@mario.cordova.862 If you are asking what keys C-M-c represent, then it is hold Control and Meta (alt, option) keys while pressing c. If you want to know what that does in Spacemacs, then use SPC h d k and press the key combination to describe what that does. Or use SPC h d b and type C-M-c to describe this key binding (you may need to scroll (`C-j`) if there are a lot of fuzzy matches. It is best to check when you are in the mode that you are wanting to use that keybinding just in case there is something set to be mode specific.#2018-11-1900:45theeternalpulseis there a way to constrain the buffers that open up in a layout by project. I often have issues where I go to a different layout and do something in the original layout that opens a buffer from somewhere not in the prolect (sometimes previous/next buffer, evil-jump commands, etc)#2018-11-1913:21practicalli-johnny@theeternalpulse if you do find a way to constrain projects buffers to layouts, then please share. I do rely on layouts to help structure task switching between different work. Using layouts does mean I have to be careful with the use of SPC TAB as if I do that just after switching between layouts, I'll pull in the buffer from the previous layout. I can kill the unwanted buffer, but it would be useful if SPC TAB could be layout specific. I couldnt find anything obvious, but will have another search around.#2018-11-1914:41jeff.terrellI think layouts are supposed to have a constrained list of buffers by default. And I haven't noticed that SPC TAB behavior with layouts before. When I tried it just now, SPC TAB was appropriately scoped to the current layout. Y'all know that layout 1 is the special 'catch all' layout, right?#2018-11-1915:17practicalli-johnnyI have 11 layouts and using SPC TAB will display the last buffer I had open, regardless of layout it is in. For example, I have a layout called *clojure and another called spacemacs*. If I switch from the clojure layout to the spacemacs layout, I see the spacemacs name in the left corner. If I press SPC TAB then the last buffer will be displayed, which will be from the clojure layout. The layout name doesnt switch (switching the layout to clojure would be an acceptable result of displaying the last buffer from the clojure layer).
The projectile specific keybindings all work as expected, its only SPC TAB that doesnt seem to honour layouts.#2018-11-1915:22jeff.terrellIs the buffer that gets switched to legitimately in the current layout, as listed by SPC b b? If not, then maybe this is a difference between spacemacs versionsāI'm on master and don't upgrade my deps very often.#2018-11-1915:28practicalli-johnnyAh, I am on develop and maybe this is a feature š I am still learning how to use layouts, so may have missed something. For now I just minimise my use of SPC TAB and use SPC b b, SPC p f or SPC f f instead. I will check to see if cycling buffers works within the context of a layout.#2018-11-1915:32practicalli-johnnySPC b n and SPC b p work correctly with the project and the layout, and give me more facility than SPC TAB, so will just use the former commands.#2018-11-1915:36theeternalpulseI'll have to check, I use master on my current laptop and develop on my work laptop (backwards huh) and get that behavior on the work desktop. I may have seen it on my home laptop but more often on my work desktop, maybe because I use it (sadly) more every day at work.#2018-11-1917:29ag@theeternalpulse SPC p l lets you open a project in a separate layout#2018-11-1917:30theeternalpulseYes, but as far as restricting buffers to that layout, I don't know if that functionality is a part of it.#2018-11-1917:31agit opens things in a layout - so regular buffer restrictions rules get applied there.#2018-11-1917:32aglayouts a bit annoying - sometimes buffers āleakā from one to another.#2018-11-1917:39theeternalpulseRight, sometimes you can't even tell until you go to projectile find file and realize it's another project's buffer#2018-11-1917:46agmaybe this could help?
(with-eval-after-load 'spaceline-config
(spaceline-define-segment buffer-id
(if (buffer-file-name)
(abbreviate-file-name (buffer-file-name))
(powerline-buffer-id))))
That replaces the filename with the full path in the modeline. That helps me tremendously to not to lose my mind working with multiple projects simultaneously#2018-11-1923:59theeternalpulselet me try that, I have the full path in the title bar just because there's more real-estate for 13in screens.#2018-11-1923:59theeternalpulsebut on my work computer I have a massive monitor.#2018-11-2017:15romainDoes someone use doom modeline with spacemacs?#2018-11-2018:15agYeah, I saw a tweet or reddit post today that they improved the performance or something.#2018-11-2018:15agI dunno, Iām satisfied with Spacemacās one#2018-11-2018:26kirill.salykinI use#2018-11-2022:48romain@U1V7K1YTZ How did you setup it? I saw a gist with a local layer but I'd prefer to use directly from repository#2018-11-2022:48romain@U0G75ARHC I saw the post too š#2018-11-2023:09practicalli-johnny@U050PEFK2 if you are using develop branch, then you should be able to add spacemacs-modeline layer and reboot. Then it should be using doom mode line and can add features to the mode line, see SPC h SPC spacemacs-modeline.
If it all gets messed up, then removing the spacemacs-modeline layer should fix things. I haven't tried it myself.#2018-11-2023:44agalso you can set dotspacemacs-mode-line-theme to doom. I think this simply changes the appearance, right?#2018-11-2023:45romain@U05254DQM EDIT: nvm, I'm on developbut didn't take the last .spacemacs š#2018-11-2100:02romain@U0G75ARHC I confirm adding doom is enough, thanks š#2018-11-2023:11practicalli-johnnySpell checking seems to be broken with the latest package or Spacemacs update, develop branch. When using SPC S c the flyspell-correct tries to correct a word a few lines before the cursor position.#2018-11-2023:38agI have bound SPC x x to flyspell-correct-at-point. Working great for me.#2018-11-2023:39agflyspell-correct-wrapper that binds to SPC S c tries to check the buffer#2018-11-2113:15reefersleepis it just me, or is magit really slow when doing a merge with many commits involved? Iām trying to add untracked files, and each one takes 10+ seconds.#2018-11-2113:16reefersleepReverting to the terminal#2018-11-2209:54manas_marthiHi all, I ran emacs --daemon, and then opened emacsclient --create-frame & and opened spacemacs. Then I typed SPC f t to open folder view. On a different terminal tab I ran emacsclient --create-frame to work on a different project. It was showing the same content as the other frame. Besides, when I tried to navigate to a folder it created two folder view windows..#2018-11-2210:04manas_marthiAny idea how to run separate daemons for Separate projects?#2018-11-2210:35ag@manas.marthi you don't need separate Emacs instances to open multiple frames. If you need separating context per project try Spacemacs Layouts. If you need to open a new frame/layout from terminal - you can run emacsclient with -e key and execute arbitrary emaclisp function#2018-11-2212:29manas_marthigot it. thank you!#2018-11-2314:55pabloreDoes anybody else is having problems with Parinfer? running SPC t P gives: Toggle: parinfer-indent
This toggle is not supported.
#2018-11-2316:43practicalli-johnny@U7V9HE682 only a guess, but can you run SPC SPC parinfer-toggle-mode successfully? I believe that is the function called (you might want to check what the keybinding says as I dont have parinfer installed myself).
I assume you are running the develop branch of Spacemas and using the parinfer layer. I would be surprised if it worked otherwise.#2018-11-2318:50pabloreI had to enable parinfer-mode manually, before it was enabled atomically every time I opened a lisp buffer#2018-11-2318:50pabloreAnd yes Iām running develop mode#2018-11-2319:52practicalli-johnnyhmm, sounds like a bug with the parinfer layer, but as I havent used and and not planning to either, then sorry I cant help further. If no one else knows, there is also a #parinfer channel#2018-11-2319:54practicalli-johnnyI assume you have either removed smartparens or disabled it for lisp-mode, But that would doest sound like it would be the cause anyway.#2018-11-2519:01theeternalpulsehas clojure refactor been removed from spacemacs clojure layer?#2018-11-2519:02kommenyes#2018-11-2519:03theeternalpulsewould clj-refactor still be recommended or was it removed for good reason?#2018-11-2519:04kommenit is optional now, see the readme on how to enable it for your config: https://github.com/syl20bnr/spacemacs/blob/develop/layers/+lang/clojure/README.org#enabling-sayid-or-clj-refactor#2018-11-2519:05kommen(sorry, if my āyesā before was somehow misleading)#2018-11-2519:07theeternalpulseah, should have read the docs š#2018-11-2519:09kommenwell, it could be easier to find onlineā¦#2018-11-2521:29aisamutern-find-definition is giving me a Request failed: ((wrong-type-argument stringp nil))`
I tried debugging that, but my elisp skills aren't that great.
I see that my tern-at-interesting--expression never returns anything, but even using tern-find-definition-by-name (where you type in the var you want) fails. Stepping in a bit I could see that on tern-req host is left as nil (instead of localhost?) and the url requests to the tern server fail.
Is that the case for everyone?
I'm running develop {:tag :a, :attrs {:href "/cdn-cgi/l/email-protection", :class "__cf_email__", :data-cfemail "facad4c9cacad4cabac8cfd4c9d4cb"}, :content ("[emailĀ protected]")}, with elpa/tern-20181108, {:tag :a, :attrs {:href "/cdn-cgi/l/email-protection", :class "__cf_email__", :data-cfemail "b3c7d6c1ddc0d9f3839d81819d83"}, :content ("[emailĀ protected]")}#2018-11-2614:47amdtAre many people here using the development branch of Spacemacs?#2018-11-2615:53amdtThanks for the reactions, everyone. I hadnāt realised how far ahead of master develop is so Iāll definitely give that a try. š#2018-11-2618:14spfeifferš£ We are going to update the release notes. Since we have a lot of commit history to process, the PR reviews and merges are frozen until we catch up. Thank you for your understanding ššš#2018-11-2618:15spfeifferhttps://twitter.com/spacemacs/status/1067118393550098432#2018-11-2711:54rowanhargHi all, (hopefully) a quick question: do you have working keybindings for the cider inspector from spacemacs? For example, I am trying to get it to go back a page with no success using the M-SPC command or by calling M-x cider-inspector-prev-page.#2018-11-2712:34practicalli-johnnyHello @rowanharg SPC SPC cider-inspect-last-result may be what you are looking for. I havent found a keybinding, so sounds like a pull request#2018-11-2713:02aisamu~SPC e v~? comma e v#2018-11-2713:02aisamuprevious page is L#2018-11-2713:03aisamu(shift l)#2018-11-2713:04rowanhargHi @jr0cket - sorry, my question was imprecise. I use cider-inspect-last-result to start the inspector but my question was about navigation once in the inspector. I can tab onto elements that cab be navigated, with RET but then not go back up.#2018-11-2713:04rowanhargThanks! @aisamu That was exactly what I was looking for!#2018-11-2713:08aisamuJust to clarify comma e v will eval and open the inspector. Also don't worry if the cider-inspect-last-result doesn't work during debugging, that seems to be the case š#2018-11-2713:08rowanhargah great, I was just going to ask about comma e v. Thanks!#2018-11-2713:09rowanhargHmm, comma e v is undefined.#2018-11-2713:10practicalli-johnny@rowanharg I use , d v to open the value inspector, opening a read-only buffer with the value of the expression or symbol. Using RET to drill down on values in the cider-inspect buffer. Thanks @aisamu for the tip about L, most useful to know (I was trying to use hand H as I thought that would be a logical choice for a vim-style binding).#2018-11-2713:11practicalli-johnnyIts , d v in the develop branch, this may be different in master#2018-11-2713:11rowanharg@jr0cket , d v works for me. Thanks!#2018-11-2713:12aisamu@jr0cket oh my, you're absolutely right - the correct is , d v not , e v... muscle memory is apparently a thing š#2018-11-2713:14practicalli-johnnyI would never have thought to use L for going back... so thanks again#2018-11-2713:16aisamuYou're very welcome - you've recently saved me with the new enable-refactoring flag...#2018-11-2713:21practicalli-johnnyOn the topic of debugging, I am quite impressed by the debugging you can do even without the sayid package enabled. I havent use debugging or the inspector that much in Clojure, but I am starting to get into it. Instrumenting a function with , d b and then calling that function and stepping through the values as it evaluates is really great way to see what is going on. I hope to get use to this soon and create some nice screencasts for debugging.#2018-11-2908:20jumarIt's very basic but I did one short video back then: https://www.youtube.com/watch?v=jHCch3-Yuac#2018-11-2914:18practicalli-johnnyGreat video, thanks.#2018-11-2713:22aisamu^ this is invaluable, and one of the things I miss the most on cljs#2018-11-2713:22rowanhargWow! That's cool!#2018-11-2713:23aisamuYou can also debug any top level statement with , d b (but with the cursor before, IIRC)#2018-11-2713:26rowanhargInspired by Stu Halloway's recent talks on RDD, I was trying to explain to a friend about the tangibility of Clojure. Are there any other resources that you can recommend to learn about this? I also saw Val's What makes a good REPL guide.#2018-11-2713:28rowanhargOh I also saw a video of Bozhidar Batsov demonstrating Cider.#2018-11-2713:34practicalli-johnny@rowanharg not tool specific, but the programming at the repl guide shows you lots of things you can do in a REPL to understand the code and values evaluated https://clojure.org/guides/repl/introduction#2018-11-2713:35practicalli-johnnyhttp://www.parens-of-the-dead.com/ also shows you what is possible. Its more live coding than a tutorial, but clearly demonstrates the art of REPL Driven Development#2018-11-2713:36practicalli-johnnyI am adding planning to add content on this topic to https://practicalli.github.io/spacemacs/, but there is still plenty to add and sections to complete#2018-11-2713:41rowanharg@jr0cket Thanks for all these!#2018-11-2713:41rowanhargI shall work my way through your guide#2018-11-2713:57practicalli-johnnythere is plenty of stuff to add to my guide, let me know what things you would find useful for me to add (on top more things about the inspector and debugging)#2018-11-2714:24rowanharg@jr0cket - Just watched your intro screencast and learned about the green bars in the lefthand side of the buffer corresponding to whether the form hand been evaluated. Thanks!#2018-11-2714:27rowanhargHave you ever managed to get two repls (one for clojure and one for clojurescript) from one project working at the same time? When I eval forms it always seems to want to send it to the repl that I just connected to.#2018-11-2714:49practicalli-johnnyI think they are improving CIDER to use the right repl based in regard clj and cljs. Not entirely sure where this is at.#2018-11-2714:51practicalli-johnnyI use the figwheel template and clojurescript-jack-in and it fires up two repls, first the clj and then the cljs repl. I almost always evaluate in the source code buffer and I think that gets it right. I think CIDER does need an occasional bit of manual help at the moment#2018-11-2714:52rowanhargAh ok. Thanks. I thought it was just me. š#2018-11-2820:22spfeifferUsing develop branch, Emacs 26.1, Linux Mint Cinnamon, when having a maximized frame of emacs, when i do c c in the magit status, the frame shrinks to some default size (way too small). Anyone got an idea what could cause that? Doing the same under Windows keeps the frame maximizedā¦#2018-11-2910:38practicalli-johnny@U067P1FT2 very strange behaviour. I havenāt seen this before. My suggestion is to set magic to start full frame by adding this variable to the git layer in .spacemacs
(git :variables
git-magit-status-fullscreen t)
#2018-11-2910:42spfeifferThanks for the hint, will try that#2018-11-2910:46spfeifferIs there a way to let magit pop up in a new buffer in the same window? For me it splits the window side by side and appears in window 2. But i do not need to have the other window still visibleā¦#2018-11-2911:45practicalli-johnnyUsing the full screen layer option displays magit in a single window. When you quit out of magit it returns to the previous layout. When doing a commit, you get two windows, one for the commit message and one for the changed text.
Here is a short video on how I use magit like that at https://practicalli.github.io/spacemacs/magit/#2018-11-2911:46practicalli-johnnyNot sure if that answers the question though...#2018-11-2911:50spfeifferI'll try the fullscreen when i am at home at my linux machine, thank you!#2018-11-2922:46spfeifferYes, the variables let magit reuse the existing window with a new buffer, but still the emacs frame shrinks from maximized to a much smaller window after c c in magit, when the commit message editor opensā¦#2018-11-2922:47spfeifferThat really annoys meā¦i have to press Meta-F10 again and again after each commit to remaximize the frameā¦#2018-11-2923:09spfeifferGoogling does not bring up anything helpfulā¦#2018-11-3011:57practicalli-johnnySorry, I havent found anything either. My suggestions to fix this are
1) move or delete everything under `~/.emacs.d/elpa - this will make Spacemacs download all packages again. A refinement would be to just delete the magit related packages
2) move or delete the ~/.spacemacs file and restart Spacemacs - you will be prompted to answer the initial questions again
3) move or delete ~/.emacs.d directory and ~/.spacemacs, clone the spacemacs repository again and start Emacs.
If you still get the same behaviour, then somehow you have configured your window manager to minimise on the keybinding c c.#2018-11-2820:23spfeifferI set the frame to maximized using dotspacemacs-maximized-at-startup t.#2018-11-2821:35Mario C.Is there a way to have the file tree open at a default root? SPC f t#2018-11-2911:35practicalli-johnny@mario.cordova.862 I assume you know about SPC p t for opening the tree (neotree) in the current project.
Have you used R when the tree (neotree) is open, this lets you change the root that neotree uses. I am unsure if that is a permanent setting though, but something easy to try.#2018-11-2919:06theeternalpulseSPC 0 is the one I use for the tree, not sure if this is just in the devleopment branch though#2018-11-2919:21Mario C.@jr0cket SPC p t works nicely, but it would be nice to have neotree open up at a certain directory as the root. I have all my projects in a projects directory#2018-11-2919:37aisamu@mario.cordova.862 semi-related, but I completely forgot about neotree once I got used to SPC p f and friends. Fuzzy matching is usually faster, and for relative navigation there's always SPC f f (or helm-find for rec. searches)#2018-11-2921:38felipebarrosYes, after getting used to Projectile I rarely use tree -C from the command line or neotree. They became only a way to internalize a directory structure, not to actually handle the files or browse them.#2018-11-3017:36Mario C.How do you change a custom-set-variable? I went into my .spacemacs files and I see the variable I want to change but there is a comment that says to not change it by hand. So how do I do it? I did it once. But forgot completely.#2018-11-3017:45aisamucustomize-variable, customize (with the UI), or setting stuff on the user section of your .spacemacs (what I prefer, with setq and friends)#2018-11-3017:49Mario C.So if I do the customize-variable --> cider-lein-parameters I can change the variable but if I restart Spacemacs the variable goes back to the previous version and friends.#2018-11-3017:57aisamuIt's been a while since I've done that... The customize UI should persist if you ask it to, though#2018-11-3017:58aisamuNow I mostly put them on the SPC f e d file and , e e them in place to play with settings without reloading everything.#2018-12-0200:27jeremyIs there a quick command for slurp barf?#2018-12-0201:19theeternalpulseSPC k to enter the lisp state, b for barf s for slurp. j moves to next closing boundary, k moves to previous opening. I use evil-cleverparans which have a simple`>` and < for slurp and barf respectively with no need for a state. It also has other movement keys that are all usable in movement mode with evil#2018-12-0201:47jeremyI guess I will need to get used to lisp state. If Iām in insert vim mode, then esc + spc + k + s seemās like a lot of work. Maybe Iām missing something.#2018-12-0210:00kommenyou can try enabling safe structural editing with , T s, then > slurps and < barfs#2018-12-0211:59theeternalpulse@U45J3R52L I did not know that evil cleverparens was already included.#2018-12-0212:00kommenit is, but it is hard to find and I also was wondering why this is not enabled by defaultā¦#2018-12-0216:35theeternalpulseI think mainly because evil-cleverparens has some confusing bindings for parens, curly brace, and brackets in movement mode that could be confusing.#2018-12-0300:27jeremyI actually had that enabled but had never learned how to use it! Thanks!#2018-12-0315:12dev.4openIDHi all. Newbie using spacemacs. Using smartparens - How do I remove a parens from a double parens? i.e ((let [a b])) should be (let [a b]) . Removing the outer parens - driving me nuts!#2018-12-0409:34practicalli-johnnyHello @dev.4openid I am writing a free online book/guide to Spacemacs for Clojure development, you may find it useful
https://practicalli.github.io/spacemacs/
I will be adding more content over the next few weeks#2018-12-0315:13dev.4openIDI have seen combo of C-q C-d this does not work#2018-12-0315:25zane@dev.4openid Are you using holy mode?#2018-12-0315:26dev.4openIDevil mode#2018-12-0315:30dev.4openIDI am developing clojure so many parens#2018-12-0315:30dev.4openIDand am learning spacemacs at the same time#2018-12-0315:30zane@dev.4openid The way I would do that is (assuming the cursor is inside the let):
1. SPC k to enter evil-lisp-state
2. 0 as many times as necessary to place the cursor on the inner (
3. r to "raise" the inner let
4. (optional) ESC to leave evil-lisp-state#2018-12-0315:32zaneHere's more information on evil-lisp-state: https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#editing-lisp-code#2018-12-0315:35dev.4openID@zane - thanks it worked#2018-12-0315:36zaneGreat! evil-lisp-state is very powerful. Once you get used to it you'll wonder how you ever lived without it. š#2018-12-0315:37dev.4openIDlong learning road ;( but......just keep on going#2018-12-0315:44zane@dev.4openid Learning Spacemacs and Clojure at the same time is very ambitious! Good luck!#2018-12-0315:48dev.4openIDread some of the referred doc and (SPC k W unwrap expression) and to (SPC k w wrap expression with parenthesis). Thx for the reference in a looooong doc š#2018-12-0315:51zaneYou're welcome! Yeah, unwrap is another way to do it.#2018-12-0315:52zaneNice thing about unwrap is that you wouldn't need to navigate to the inner (.#2018-12-0316:26PBQuite often I'll accidentally realise a large datastructure in my repl and crash it. Is there an option to set the max eval size or something?#2018-12-0317:32zane@petr You want *print-length* and *print-level*.#2018-12-0317:32zanehttps://clojuredocs.org/clojure.core/*print-length*#2018-12-0317:32zanehttps://clojuredocs.org/clojure.core/*print-level*#2018-12-0322:05matthiasHere are some related cider settings I use:
(setq cider-debug-print-length 10
cider-debug-print-level 10
cider-repl-print-length 10
cider-repl-print-level 10
cider-stacktrace-print-length 10
cider-stacktrace-print-level 10)
#2018-12-0413:28jeff.terrellTIL about evil-exchange, bound to g x by default. Do g x, then a motion to delineate some text. (Visual selection before g x works too.) Then go somewhere else, type g x and another motion, at which point the two regions you defined are exchanged.#2018-12-0414:08aisamuThat's one that I dropped in favor of lispy's teleport!#2018-12-0512:14practicalli-johnnyThat's really nice, thanks Jeff#2018-12-0413:31jeff.terrellI found this because somebody shared a useful vim tip that, so far as I can tell, Spacemacs lacks: visually select some lines that have a number in them, then g C-a increments the numbers so that each line has a bigger number. IOW, with these lines selected:
this is a line with a 0 in it
this is a line with a 0 in it
this is a line with a 0 in it
ā¦then g C-a will convert them to this:
this is a line with a 1 in it
this is a line with a 2 in it
this is a line with a 3 in it
#2018-12-0512:34practicalli-johnnyThat vim tip would be great.
You could increase all the numbers at the same time with iedit SPC s e and use number increase/decrease at point SPC n + and SPC n -.
Not as useful, but wonder if it could be adapted?#2018-12-0413:31jeff.terrellIt looks like the closest thing Emacs has is C-u C-x r N, as described here:
https://stackoverflow.com/questions/29405042/increment-numbers-in-visual-vertical-block-selection-in-emacs-evil#2018-12-0414:08aisamuThat's one that I dropped in favor of lispy's teleport!#2018-12-0418:50theeternalpulsehow do I solve the problem where I can't do anything because of these errors command-execute: Cannot open load file: Too many open files, counsel-projectile
face-attribute: Cannot open load file: Too many open files, evil-surround
#2018-12-0418:51theeternalpulseI've tried clean buffer list but that doesn't do anything#2018-12-0418:51theeternalpulsetrying to do M-x gives me Error running timer āwhich-key--updateā: (file-error "Read error on documentation file" "Too many open files" "DOC")
command-execute: Buffer is read-only: #<buffer *spacemacs*>
#2018-12-0418:51theeternalpulsecan't even restart because of too many open files#2018-12-0419:12theeternalpulsefound a way to get to "kill some buffers" and did it. Not sure how this happened, is there a setting or something I need to prevent this. i'm on a mac-book pro so I'm surprised I got this, not sure the origin#2018-12-0512:43practicalli-johnny@theeternalpulse Do you know how many buffers (approximately) you had open?
I often use helm transient state to clear down buffers, e.g. SPC b B for global buffer list, then M-SPC for helm transient state. Narrow by typing a pattern for the name if required, use T to mark all buffers listed and M-D to kill marked buffers.
I often do this for Magit buffers that seem to hang around, using Magit as the pattern in the above process#2018-12-0514:31aisamuNice!
I had M-SPC shadowed by Alfred!
The workaround was to use helm normally to filter, C-SPC to select without helm transient and M-D to remove
I wonder what else M-SPC contains...#2018-12-0514:55jeff.terrellCan you M-x when helm is open and find the helm transient mode function? I do something similar when M-SPC doesn't work for org agenda transient mode.#2018-12-0515:26aisamuIt complains about opening helm inside helm š#2018-12-0515:30jeff.terrellAh rightā¦because M-x uses helm for autocompletion. That makes sense.#2018-12-0607:51jumarFor this I just use SPC b B -> filter -> select with C-SPC -> kill#2018-12-0607:52jumar@U1UQEM078 https://practicalli.github.io/spacemacs/why-spacemacs/helm-transient-state.html mentions also S-M-SPC as an alternative shortcut.#2018-12-0621:47theeternalpulseI see, I pretty much cleared out the buffers with kill some buffers, and that was after a restart. I thought clean buffer list would work, but that doesn't do much forme#2018-12-0512:43practicalli-johnny@theeternalpulse Do you know how many buffers (approximately) you had open?
I often use helm transient state to clear down buffers, e.g. SPC b B for global buffer list, then M-SPC for helm transient state. Narrow by typing a pattern for the name if required, use T to mark all buffers listed and M-D to kill marked buffers.
I often do this for Magit buffers that seem to hang around, using Magit as the pattern in the above process#2018-12-0514:31aisamuNice!
I had M-SPC shadowed by Alfred!
The workaround was to use helm normally to filter, C-SPC to select without helm transient and M-D to remove
I wonder what else M-SPC contains...#2018-12-0514:08jeff.terrellOoh, helm transient stateādidn't know about that, nice!#2018-12-0516:14practicalli-johnnyI had helm transient state shadowed by Ubuntu (Gnome) window manager, so that gave a few fun moments š
https://practicalli.github.io/spacemacs/why-spacemacs/helm-transient-state.html#2018-12-0516:52practicalli-johnnyI havent tried out the execute action placeholders 0..9, I assume I could assign some function call to each custom action to build my own shortcuts#2018-12-0516:56aisamuThey're mapped to the f1-f10 actions (a blessing on my fn-less kb)#2018-12-0516:56aisamu(the ones you usually see on C-z or transient a)#2018-12-0518:11practicalli-johnnyAh yes, that makes sense now. I wonder if you can change which functions are mapped (without changing the layer elisp)#2018-12-0823:44Daoudahey guys#2018-12-0823:45Daoudahow to copy and paste in Spacemacs please?#2018-12-0823:47agVim or Emacs keybindings?
Vim: y -> p
Emacs: M-w -> C-y#2018-12-0823:58Daoudamy big problem is i even don't know how to use those shorcuts, how and where to type them#2018-12-0823:59Daoudathis is the big problem, i saw a lot of command but for some reason i type them and nothing happen, so i think i missing something else#2018-12-0900:01Daoudawhat should i don from here to paste?#2018-12-0900:01Daoudawhat should i don from here to paste?#2018-12-0900:50practicalli-johnnyp for paste. use v to go into visual mode and select text you want to copy, y copies (yanks the selection)#2018-12-0900:57practicalli-johnny@quieterkali this quick reference should help with some of the most useful keybindings https://practicalli.github.io/spacemacs/spacemacs-basics/vim-quick-reference.html#2018-12-0900:58practicalli-johnnythere are a few other pages in that section that should help#2018-12-0911:12spfeiffer@quieterkali I recommend taking a general tutorial on vim basics, they apply to spacemac s, too.#2018-12-0911:13spfeifferAnd there is the buildin tutorial, i think it is SPC h T iirc.#2018-12-1015:17tbrookeI saw a video where they automatically inserted the ns require with Cursive (ie put str/ and it inserts [clojure.string :as str] )- I saw you can do it with clj-refactor-- spacemacs docs says clj refactor is included in the layer and has code to insert in your .lein/profiles.clj - but after I added it the repl wonāt start ā Also donāt I want to migrate to tools.dep anyway? Any thoughts on tools.dep with Spacemacs#2018-12-1211:02practicalli-johnny@U054219BT clj-refactor is now an optional package in the Spacemacs Clojure layer, as its features are migrating into clojure-mode package. You have not needed to add anything to .lein/profiles since version 0.10 of Cider.
To add clj-refactor for any Clojure project, edit your .spacemacs file and in the dotspacemaca/layers section, replace clojure with
(clojure :variables
clojure-enable-clj-refactor t)
#2018-12-1211:16practicalli-johnnyI am assuming you mean this function from clj-refactor, which has a keybinding of , r a r in Spacemacs
https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-require-to-ns#2018-12-1214:01tbrooke@U05254DQM Thank you that was exactly it ā somehow I misread that clj-refactor was automatically included in the Clojure layer but it isnāt š#2018-12-1215:48practicalli-johnnyIt's is a recent change, in the last couple of months on develop#2018-12-1207:26felipebarrosPlease, I believe I may have found a bug but I would like to know if another person can replicate it before reporting. Be warned that it will kill Emacs if it "works" for you!
Create a new clojure project with lein new app kill-emacs, navigate to the root folder of the project and open a new file and save it on disk. On that file, connect Cider with cider-jack-in-clj and, after it connects, start a code block with <s TAB, write clojure after it and then start to write :results but stop at some point and press TAB to auto-complete it. Here it kills Emacs immediately.
This is how the source block should look like, your cursor right after the :res:
#+BEGIN_SRC clojure :res
#+END_SRC
#2018-12-1316:55practicalli-johnny@U6MEUHZBK I was not able to replicate the issue you had. I updated Spacemacs and packages a week ago. I am just updating now and will try again.#2018-12-1316:55practicalli-johnnyI am unclear why you would put anything on the same line after clojure (although am still learning lots of things about org mode). Can you explain what it should do?#2018-12-1322:59felipebarrosThat is where you can define variables and export paths to the following source code. It can be really complex and I only use it with moderation. Examples can be found here: https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html#2018-12-1409:44practicalli-johnnyThank you, that's a really useful article. I will give some literate programming a try on Sunday and let you know if I can replicate your bug.
Are you able to evaluate without using :results after clojure?#2018-12-1421:50felipebarrosEven with :results I can evaluate, the problem is just when auto-completing. If I write it down it doesn't crash. š Thanks for taking the time#2018-12-1421:52felipebarrosI actually don't do literate programming, but I love to take notes on whatever I'm studying with org-mode, and being able to evaluate wrong code, explain rationales, evaluate some more stuff, and have it all nicely represented and easily exportable is just awesome. š#2018-12-1421:55felipebarrosIt's a way of literate programming, "programmable note taking" haha but so far I have very little experience with tangling an entire file to produce source code. I just evaluate things in place and print either the function itself, the results or both to my "note".#2018-12-1207:27felipebarrosI'm on latest develop and all packages are up-to-date.#2018-12-1412:13achikinHow can I set up/use ggtags in spacemacs/cider? I can see some ggtags bits in clojure layer, but I can't figure out what steps should I perform in order to make it work https://github.com/syl20bnr/spacemacs/blob/master/layers/%2Blang/clojure/packages.el#L290 ?#2018-12-1422:17Mario C.In IntelliJ you can hit CMD and the click on a variable and it will jump to the file where it is defined. By any chance does emacs have this functionality???#2018-12-1422:22jumarcider does have it if you've started a repl: cider-find-var.
Most often, I use g d (jump-to-definition) which is like cider-find-var and is able to jump to the symbol by name even without the REPL (at least in the same file)#2018-12-1422:30Mario C.š:skin-tone-2: š#2018-12-1422:40felipebarrosWell, since I use Holy mode, I'll just leave it here. M-. to cider-find-var and M-, to come back from the definition file with cider-pop-back.#2018-12-1712:27n2oM-Ret g g is "jump to definition" which i use very often. M-Ret g b jumps back#2018-12-1819:48dev.4openIDHi, I have developed trouble with spacemacs (evil mode) and cider. Suddenly when I press ,' to invoke cider repl I now get "Creating directory with prefix ........etc. " Somehow it has lost the settings#2018-12-1820:23practicalli-johnny@UEGT2541J I havent seen this, so I would be interested to know:
did you run a package upgrade?
did you edit any of the elisp files in the clojure layer?
did you add anything to .spacemacs, especially new keybinding definitions?
did you add a new layer?
did you add a specific package?#2018-12-1820:29practicalli-johnnyHave you just tried restarting Emacs and seeing if you still get the same error?
Sorry, these are all fairly common sense things I am suggesting, as there is not very much context to go on.#2018-12-1820:30practicalli-johnnyIf a reboot does not fix it, try delete all the clojure layer packages from your .emacs.d/elpa directory and restart emacs#2018-12-2013:46dev.4openIDWhat I did eventually was to remove macs/spacemacs totally, then I copied a working copy of .emacs.d and .spacemacs from my other computer and it worked out.#2018-12-2013:47dev.4openIDI must have been a config issue somewhere - I tried reinstalling etc. but nothing worked. I have no explanation for it. But sorted#2018-12-2015:41practicalli-johnnyTricky problem to solve. You made a good choice on how to fix it.#2018-12-1819:48dev.4openIDany ideas?#2018-12-1819:49dev.4openIDCider pops up in the at the , press I but cannot go further#2018-12-1900:52Mario C.I accidentally did CMD SHIFT n#2018-12-1900:52Mario C.and now my searched words are highlighted in the buffer. what did i do?#2018-12-1900:52Mario C.how to undo?#2018-12-1900:53Mario C.seems like my window number is going up#2018-12-1900:55Mario C.its seems like I opened up workspaces...?#2018-12-1900:55Mario C.pretty cool. Didn't know this feature existed#2018-12-1914:23cjsauer@mario.cordova.862 I use SPC s c. Mnemonic is āsearch clearā. #2018-12-1914:39SenIs anyone here using Zulip? I just wonder because there is one question I asked stays without any response#2018-12-1918:08zaneI use it. What's the question?#2018-12-1918:11SenWell, it is on Zulip, I didn't post it here, because I needed to post images as well, with Slack I don't have much space for images. Essentially, I have trouble with color highlighting of a function call.#2018-12-2018:56Mario C.IntelliJ has a unique feature where it highlights a variable dark gray if its not being used. Is there a layer for such a thing in emacs?#2018-12-2019:21ag@mario.cordova.862 use joker-clj with flycheck-joker. It shows more than just unused vars and such#2018-12-2019:47Mario C.Hmm I can't get flycheck-joker to install. Tar not found when trying to install the package#2018-12-2020:41practicalli-johnny@mario.cordova.862 Here is how I install Joker and configure Spacemacs to use it https://practicalli.github.io/spacemacs/improving-code/linting/joker.html#2018-12-2020:42practicalli-johnnyThere is a clojure-lint layer, although its not been added to the Spacemacs repo yet, so you can clone it as a private layer.#2018-12-2020:43practicalli-johnnyExpect Joker to give you a few false positives, although these are usually just macros and functions from external libraries, so easy to spot.#2018-12-2020:44practicalli-johnnyI do find Joker very fast, so use that for continual feedback. For production code, I recommend ALSO using Eastwood and Kibit to get comprehensive feedback on your code before committing it š#2018-12-2021:51Mario C.@jr0cket Thanks! Gonna try it once I get down time again#2018-12-2023:08practicalli-johnnyMy pleasure. Let me know if you have any more issues or do something different to make it work. I would like to capture any other setups in the book.#2018-12-2101:37Mario C.@jr0cket Once I go through the steps will Joker automatically start linking my code?#2018-12-2101:37Mario C.It seems like I did everything right but nothing is happening#2018-12-2117:24ag@mario.cordova.862 in a clj file do M-x flycheck-verify-setup. see what it says#2018-12-2117:29Mario C.Okay so it looks flycheck is installed#2018-12-2117:30Mario C.I can run flycheck-mode and it does some highlighting#2018-12-2118:20agand as @jr0cket said you will be hit with a bunch of false positives. There are ways to reduce the noise. Feel free to ask questions#2018-12-2118:22Mario C.Yea got it up and running! It seems to give me errors on macros which is expected#2018-12-2118:25agā File: /Users/agibragimov/.jokerd/linter.cljc
1 ā (declare deftest)
2 ā (declare use-fixtures)
3 ā (declare testing)
4 ā (declare is)
5 ā (declare are)
ā File: /Users/agibragimov/.joker
1 ā {:known-macros
2 ā [clojure.test.check.generators/let]
3 ā :known-namespaces [clojure.string clojure.set]
4 ā :known-tags []
5 ā :ignored-unused-namespaces [clojure.spec.alpha clojure.test]
6 ā :rules {:if-without-else true
7 ā :no-forms-threading true}}
You also may need to set up those two files, your settings may be different#2018-12-2216:40Drew VerleeTwo questions. One straight forward the other a bit more subjective š.
1. How do you enable a spell checker? Nothing i find seems to care that i have typed serach instead of search
2. Whats a good way to go about learning emacs through the spacemacs perspective. e.g I feel like we have layers instead of packages. Often Packages have instructions like "just add this" (some code i dont understand) but it doesn't even explain where or what it does, i feel like the readmes assume an expert level but given how sprawling emacs and that i'm fairly committed to spacemacs it hard to figure out where to start and where im supposed to end up in terms of learning ideas.#2018-12-2216:49practicalli-johnny@drewverlee 1) spell-checking layer - this needs an external spell checker on your operating system to work though. It looks for aspell by default (on Windows, this is a bit of a challenge to get working)#2018-12-2216:50practicalli-johnny2) a bit of self promo of my (work in progress) book on Spacemacs... https://practicalli.github.io/spacemacs/#2018-12-2216:50Drew Verleethanks! spell-checking is what im using now, i should have said that. I'm on ubuntu so maybe i need to enable something.#2018-12-2216:51practicalli-johnnyspell-checking should just work if you have aspell installed. Try running it on the command line in ubuntu#2018-12-2216:51Drew Verleeits installed#2018-12-2216:52Drew Verleecould the linter joker be doing something to interfere? im just guessing now#2018-12-2216:52practicalli-johnnyI assume aspell also needs one of the dictionaries to be installed too#2018-12-2216:52practicalli-johnnybut that should all be by default#2018-12-2216:53practicalli-johnnyI doubt joker is the problem, as it doesnt break things for me#2018-12-2216:53practicalli-johnnyIf you look at the spell-checking docs, SPC h SPC spell-checking it does tell you how to disable spell checking, so maybe try the opposite of that#2018-12-2216:54Drew VerleeThanks. To be clear. In emacs, in clojure-mode, if i type serch i would for the editor to indicate its probably a misspelled word. Right now, nothing happens.#2018-12-2216:55Drew Verleei disabled and enabled, nothing happened#2018-12-2216:57practicalli-johnnyAh, interesting. If you have serch as a string, then spell-checking works just fine (for me). If serch is a symbol or a function name, then Joker is reporting an error (and possibly hiding the spelling mistake).#2018-12-2216:58practicalli-johnnyIn what context are you using serch? In a string, a function name, argument, ???#2018-12-2216:58Drew VerleeRight, yes. As a string it highlights as red#2018-12-2216:59Drew VerleeI should have been more clear, i would like it to be checking symbols and keywords to i suppose. Which is probably the hard part of this...#2018-12-2217:10practicalli-johnnyHmm, interesting things happening here. If you use SPC SPC flyspell-correct-at-point on either a symbol or keyword then it will offer you a helm list of spell check corrections. However, as you have seen its not showing you the spell-checking visual warnings in the text#2018-12-2217:11practicalli-johnnyIt seems (and this is an assumption) that keywords are simply ignored by spell-checking and symbols show the error from Joker (presumably over the top of or instead of the spell-checking visual error).#2018-12-2301:54Drew Verleeit seems ispell buffer will spell check all the text for me. Which is good enough as an assistant check, without having to put in the energy of looking at every single word in the file š#2018-12-2301:55Drew Verleeit requires i add words from my project to the dictionary of course#2018-12-2316:52practicalli-johnnyThe clojure-cheatsheet package is now deprecated and moved into clojure-mode, so I am looking at creating a pull request to update this in the clojure layer. You can already run SPC SPC cider-cheatsheet to get the cheatsheet, however the , h c keybinding is bound to the broken clojure-cheatsheet.#2018-12-2320:54eccentric JWhenever I try to run cider tests automatically it closes my repl buffer. Any idea why that happens or how to learn why?#2018-12-2409:40practicalli-johnnyIs the REPL buffer actually closing (and probably killing your REPL) or is the test results buffer just being shown in the same window (effective hiding the REPL window)?#2018-12-2409:41practicalli-johnnyWhat keybinding / command are you using to run the tests?
Do the tests run outside of Spacemacs (e.g. with lein test)#2018-12-2416:59eccentric J@U05254DQM The repl window is closed but the buffer still runs. I have put the cider-test-report buffer in a vertical split above the repl. I have set auto testing to on so that it runs lein test everything a file is loaded C-c k. Does that help? I can record a gif if that would be helpful.#2018-12-2418:08practicalli-johnnyA gif could be useful.
I dont usually have the REPL buffer shown in a window, but its always there in the buffer list (if I kill the REPL buffer, then it kills the repl).
I will open a simple Leiningen project, run the REPL, show the repl buffer in a window (`, s s`) and run the tests to see if I can replicate it. From memory, a test report window will open and replace one of the other buffers that was being show (although all buffers stayed open).#2018-12-2418:24eccentric J@U05254DQM Hereās a gif of the expected results, for some reason it was behaving as expected. What happens is sometimes I do C-c k and the repl buffer window closes and the test expands to full height. https://cl.ly/e1f54c9ceb01#2018-12-2423:03practicalli-johnnyHmm, I dont have a keybinding for C-c k, what function is that calling (`SPC h d b` should tell you)?
I am running , t a to run all tests and the test report buffer will display in place of an existing buffer if the test buffer is not already showing. This is normal behaviour as I understand it. The test buffer should be the active window (has the cursor) so pressing q will quit the test report and show you the buffer that was in the window previously (eg. your repl). If you have the test report buffer shown in a window, then any new test report should always appear there.
If you find this behaviour not to your liking, you could look into https://github.com/bmag/spacemacs-config/tree/master/layers/window-purpose to define a configuration to guide Emacs placement of windows (this is not something I have tried yet)#2018-12-2423:18eccentric J@U05254DQM Oh it was C-c C-K which with a pretty stock spacemacs is cider-load-buffer#2018-12-2500:56practicalli-johnnyAh, that makes sense, I have that binding. I never use it though. I use , e b if I want to evaluate the whole buffer (but rarely do that either). Interesting to learn about other peoples workflow though.#2018-12-2321:53theeternalpulsegot sick of moving the cursor in evil mode to so I swiped this from evil-adjust and modified it.
(defun user/cider-eval-last-sexp (&optional arg)
(interactive "P")
(let ((eval-exp #'cider-eval-last-sexp))
(cl-case evil-state
('normal (progn
(evil-append 1)
(funcall eval-exp arg)
(evil-normal-state)
))
('visual (progn
(evil-append 1)
(funcall eval-exp arg)
(evil-visual-restore)
))
(otherwise
(funcall eval-exp arg)))))#2018-12-2717:29aisamuWe could use a docstring with the usage š¬#2018-12-2322:20cjsauerNever knew about clojure-cheatsheet/`cider-cheatsheet`...nifty#2018-12-2409:49practicalli-johnny@theeternalpulse can you explain the problem you were experiencing , sorry I am not sure I get it.
I use , e f or , e ; mostly to evaluate Clojure expressions in the source code buffer. This works anywhere in the expression, no matter how nested.
Are you using , e e at the end of the line instead? I only use that on the next line (or lines) below the expression as it easy to evaluate a nested expression otherwise.
#2018-12-2417:46theeternalpulseI bind this to , e e at the end of the paren without going to the next word or next line#2018-12-2417:47theeternalpulseit's basically what lisp has for eval last sexp but for clojure. I use , e f sometimes but I have started using comment blocks for my experiments and this makes it easier.#2018-12-2417:49theeternalpulseI'd like to include something in evil-adjust where you can specify the eval function with an alist so that this code can just determine what it should use in what mode, since by defautl evil-adjust is just for lisp#2018-12-2418:16practicalli-johnnyI use #_ to comment each expression, rather than a comment block. It allows eval by the developer and you dont have to worry about evaluating the comment block. Works very nicely in threading macros and inside any other expression#2018-12-2418:19practicalli-johnnythe comment function returns nil, where as the comment reader macro simply makes things disappear š#2018-12-2419:45theeternalpulseTrue, I just like the way evil-adjust works and wanted to get it to work the same for clojure. I sometimes try things out inline and I always run into wanting to eval at the end of the sexp rather than jump afterward#2018-12-2421:21practicalli-johnnyThe nice thing about Emacs is you can customise it to do what ever you want š#2018-12-2817:28dijonkitchenAnyone ever thought of making Spacemacs easier to use for Clojure beginners? Perhaps like a permanent insert mode like a regular text editor instead of Vim/Emacs/Hybrid bindings?#2018-12-2817:35Mario C.So anytime I open a buffer I would have to get out of insert mode to move around?#2018-12-2817:47spfeifferWell, if you do not want the advantages of emacs/vim-bindings, just use vscode. I see no advantage in dumbing down Spacemacs, giving up core principles.#2018-12-2819:40pabloreSpacemacs is very bad for someone without vim/emacs experience. because of the learning curve. I would suggest Cursive instead, hoping that we have a community/free version in the near future.#2019-12-3115:23aisamu"very bad" is definitely too strong.
It took me a month to be as productive as I was with Atom, with no previous emacs or vim experience other than the in-editor tutorials, using only video tutorials.
With some sprinkled direct guidance, the ramp up takes only a couple days, and after that you're just increasing the speed by memorizing the shortcuts. (and at your own pace, since M-x fuzzy search is as good as Atom's)#2018-12-2819:42Mario C.Its honestly not that bad. You just have to stick with it for a week#2018-12-2820:14practicalli-johnny@dijonkitchen I started writing a book to help make Spacemacs easier for Clojure beginners. There are so many useful features that I wouldnt want to remove from people, so a cut down version of Spacemacs doesnt make sense to me. I appreciate Vim can be a challenge, so I have tried to help with that too. I dont think Spacemacs is as hard to learn as IntelliJ or Eclipse (assuming you have never used them before)#2018-12-2820:14cjsauerIād say learning Clojure and ~Spacemacs~ vim simultaneously is not a good idea, but learning Vim can seriously enhance productivity once itās understood. āVim: Code at the Speed of Thoughtā is a great book for learning vim.#2018-12-2820:17practicalli-johnnyThere are quite a few alternative editors to using Spacemacs and knowing a few basics of Vim does help alot. I wouldn't recommend Spacemacs or Emacs unless you are going to use it for everything, that is where you get the most benefit. Then its definitely worth the investment in learning. I also wouldnt recommend using Spacemacs with the Emacs keybindings, as they are so much harder to learn.#2018-12-2820:22practicalli-johnnyI always recommend to people learning Clojure that they use the editor they are most familiar with. If they have never used an editor (new to coding) then there is https://repl.it/. The editors I recommend to choose from are http://Atom.io, VSCode, Spacemacs, or IntelliJ https://clojurebridgelondon.github.io/workshop/development-tools/#2018-12-2820:25practicalli-johnnyPersonally I have always found IntelliJ very confusing, as was Eclipse, even after 20 years of Java development. VS Code is very nice editor and the developer of Calva is building a plugin that is very similar in concept to CIDER and they are very helpful in the slack channel. I struggle with the keybindings for http://Atom.io and ProtoREPL (and the need for a dependency), although Proton gives a nice Spacemacs light way to use Atom and ProtoREPL.#2018-12-2820:27practicalli-johnnyI dont think there is a problem with learning Vi, Spacemacs and Clojure all at once, you just need to set your expectations on your progress. There is a lot of each of those that can be learnt gradually (as I have discovered over the last few years).#2018-12-2820:50Mario C.Basic file editing and project navigation are the crucial first steps. When I first started using spacemacs I was really off put by the fact that if I forgot I wasn't in insert mode and I typed something that it put me into some random mode that I didn't know how to escape from.#2018-12-2820:51Mario C.Still happens to me actually. If I think I am focused on a chrome and I do CMD shift n... for incognito window but I am in fact focused in spacemacs it will open a new hidden window... bizarre#2018-12-2821:04dijonkitchenYeah, Iām thinking about this more from the perspective of Clojure, as a language, and making it easier to adopt for beginners. As much as we may like Vim/Emacs, we already know it, but newcomers may not and that may be a barrier high enough for them to not explore Clojure as well. While other editors can use Clojure, they arenāt really second-class citizens when it comes to the REPL integrations and just everyone elseās experience if they ever need help. Iām just saying it might be interesting to have a ābeginnerā mode where they can just learn one thing and learn it well then be inspired to learn the rest of the ecosystem.#2018-12-2823:41Mario C.Has anyone noticed spacemacs hanging when using SPC f t or SPC p t? It happens after switching back to spacemacs and then using said commands. It just freezes so I have kill the process and restart spacemacs.#2018-12-2901:43agnerdtree or treemacs? which one youāre using?#2018-12-2901:45Mario C.I believe its neotree#2018-12-2901:46agah⦠right⦠nerdtree is for Vim#2018-12-2901:47agtry treemacs⦠see if it behaves differently#2018-12-2901:51Mario C.hmm I guess ill give it a go next week. It doesn't freeze frequently and who knows if its even neotree but it happened 2-3 times today which is odd#2018-12-2901:52agI personally use direx, itās clean and simple.#2019-12-3115:23aisamu"very bad" is definitely too strong.
It took me a month to be as productive as I was with Atom, with no previous emacs or vim experience other than the in-editor tutorials, using only video tutorials.
With some sprinkled direct guidance, the ramp up takes only a couple days, and after that you're just increasing the speed by memorizing the shortcuts. (and at your own pace, since M-x fuzzy search is as good as Atom's)#2018-12-2901:54practicalli-johnny@dijonkitchen Could you define what a beginner mode would look like?#2019-12-3116:41dijonkitchenBasically one you can learn Clojure without vim or emacs but can use packages #2019-01-0119:32practicalli-johnnySorry, I really donāt understand what that means#2019-01-0320:02dijonkitchenA basic editor like VScode but with emacs packages for clojure#2019-01-0509:55practicalli-johnnyI wouldnāt really call VSCode a basic editor as itās more complex than say sublime. VSCode very basic editing functions (Cntl-x|c|v) should be more familiar to those used to window/word/notepad editing than Emacs and Vim. As there is already the Calva addon for VSCode, aiming at delivering a CIDER like experience, then there seems little value in putting a lot of effort into simplifying Emacs or Spacemacs.
You could install just Spacemacs base distribution and the Clojure layer, but it sounds like you are asking to remap a lot of the editing keybindings to make them more familiar to those who donāt know Emacs or Vim. That would take a fair bit of thought to come up with the right config that was familiar and yet didnāt stop you from progressing to an Emacs or Vim approach. I donāt think there is any advantage to users in using Emacs as just another editor.#2019-12-3100:59Drew VerleeI'm looking to move from away from Parinfer, just to see if something else works better for me. I'm looking at Lispville and Lispy-evil, which would appear to be almost the same thing. There also similar to evil-cleverparens which comes with spacemacs. Anyone have any opinions on any of these?#2019-12-3115:27aisamuLispy/Lispyville changed my life. I was about to buy a pedal (`SPC k`- on press, Esc- on release), or drop evil mode altogether.
At the very least enable the safe mode for the existing cleverparens/smartparens thing.#2019-12-3102:45Drew Verleeactually, i feel i would probably be happy with parinfer smart mode. Which is still in development, i might take the risk though š . Having trouble integrating it in though. The instructions say: (require 'parinfer-smart). I assume i add that to my dotspacemacs/user-init and have it somehow take the file parinfer-smart.el file as an argument, which im not sure where to put.
(#2019-12-3104:12practicalli-johnnyI really like smartparens in global strict mode and use lisp state quite a lot. Although with evil-cleverparens I can do a lot of simple editing and refactoring of Clojure just with the evil keybindings and itās really quick#2019-12-3104:14practicalli-johnnyI never got used to parinfer changing my code around. I guess I am too used to structural editing, which seems to conflict in my mind when using parinfer#2019-12-3115:27aisamuLispy/Lispyville changed my life. I was about to buy a pedal (`SPC k`- on press, Esc- on release), or drop evil mode altogether.
At the very least enable the safe mode for the existing cleverparens/smartparens thing.#2019-12-3117:38Drew Verlee@aisamu did you look at Lispy evil?#2019-12-3118:10aisamuYup, that's what I use now! Lispyville + lispy#2019-12-3118:22lilactownanyone know how to install a specific version of a package?#2019-12-3118:23lilactownthereās a bug in the latest version of smartparens that is really effecting me. trying to roll back#2019-12-3118:34lilactownOK for now, I just cloned the repo into my elpa file, renamed it something like what the original folder in elpa was named smartparens-20181212.1956, checked out the commit I wanted, and copied the smartparens-autoloads.el file from the original folder#2019-12-3118:35agyou can also pin melpa stable packages, try like this:
(add-to-list 'package-pinned-packages '(ac-cider . "melpa-stable") t)#2019-01-0109:06practicalli-johnny@lilactown you can also pin a specific Emacs package http://jr0cket.co.uk/2017/03/spacemacs-managing-broken-emacs-packages.html#2019-01-0323:31agfyi @jr0cket it appears that the quelpa instructions are broke in Spacemacs, so this:
(cider :location (recipe :fetcher github
:repo "clojure-emacs/cider"
:commit "97b95f5b5bb4f9c8f439375b4238d41fd5be9926"))
doesnāt work anymore and throws:
(Spacemacs) Error:
An error occurred while installing cider (error: (wrong-type-argument package-desc nil))
#2019-01-0509:39practicalli-johnnyAh, thanks for letting me know this is now broken, Iāll add a note to the blog. I havenāt had to use this config since I wrote the blog post (and the package had been fixed by the time I had published the post :)#2019-01-0419:11agSo, if you are on osx and for some reason you cannot use latest CIDER (because it requires latest lein 2.8.3) and you need to pin 0.18.0 version of CIDER:
0) brew install gnu-tar
1) at the top of your dotspacemacs init file, add: (setq-default quelpa-build-tar-executable "/usr/local/bin/gtar")
2) add the following to dotpacemacs-addtional-packages
(cider :location (recipe :fetcher github
:repo "clojure-emacs/cider"
:files ("*.el")
:commit "97b95f5b5bb4f9c8f439375b4238d41fd5be9926"))
3) go to ~/.emacs.d/elpa and nuke these rm -rf *cider* *clojure*
4) restart Emacs#2019-01-0522:39dangercoderWhat packages are you guys currently using to make your life easier using Emacs/Spacemacs (For refactoring and navigation)? I have yet to give Cursive a serious try, but I miss "find usages" from intelliJ. I am currently using cljr-factor but it does not work as good for "find usages.." (imo š)#2019-01-0608:21practicalli-johnny@jarvinenemil can you elaborate on what you do with find usages and specifically what is missing for you?
I use the tools that come with Spacemacs to refactor and navigate (Vim, iedit, narrowing, etc,), no need for specific packages. I rarely use clj-refactor, except for maybe changing parents, e.g. turning a list into a vector, etc.#2019-01-0611:20dangercoderI am looking for a way to "find usages" of a certain function. That is the only thing I miss. Didnt really find anything except clj-refactor which supported that.#2019-01-0611:21dangercoderI want to see all "places" where a certain function is used, with place I mean file and line-number.#2019-01-0618:55spfeifferIn nearly all cases, i am perfectly happy with SPC /.#2019-01-0619:42dangercoderOh my god I forgot about that one. Thank you a lot @U067P1FT2! Now I can grok even harder š#2019-01-0619:48spfeifferyou're welcome. Might bring up some false positives compared to IntelliJ, but for me it was good enoughā¢.#2019-01-0707:22jumarYeah, I'd love to see proper "find usages" in emacs but I also use full-text search most of the time because of lack of support. A bit annoying but kinda works. cljr-refactor isn't really usable for this. It often fails and it's quite slow#2019-01-0712:50aisamu@jarvinenemil @U067P1FT2 SPC * is also nice (`SPC /` for the thing under the cursor)#2019-01-0905:48dijonkitchenAny have $SPACEMACSDIR working? Iāve just set it to something simple like $HOME'/dotfiles/.spacemacs.d', but I think something is weird here: https://github.com/syl20bnr/spacemacs/blob/develop/core/core-dotspacemacs.el#L47#2019-01-0905:55dijonkitchenHere are the docs for it; Iām on the develop branch too. http://spacemacs.org/doc/DOCUMENTATION.html#alternative-dotdirectory#2019-01-0910:00practicalli-johnny@dijonkitchen I just use the default .spacemacs.d, it works very well#2019-01-0917:30dijonkitchenyeah, iāve gotten the default one working, but not the custom one#2019-01-0918:22agif you want to keep spacemacs init file in a directory (possibly with all the custom layers), you can do the following:
1. rename .spacemacs.d file to init.el
2. mkdir ~/.spacemacs.d
3. mv init.el ~/.spacemacs.d/
Now you can set dotspacemacs-configuration-layer-path '("~/.spacemacs.d/layers/")
and keep all your custom layers in that directory. Now your entire spacemacs config is āgittableā#2019-01-1004:23dijonkitchenI get that, but thatās not the environmental variable way I mentioned above.#2019-01-1019:45Mario C.If I am running ediff and went out of it how can I go back in?#2019-01-1019:45Mario C.I wanted to get rid of some windows so i did SPC w d on a window but now I cant seem to go back into the ediff mode#2019-01-1019:51aisamuThere's always SPC w u#2019-01-1019:53Mario C.I am seeing that I have the ediff control panel open but I can't move around and see my changes. By that I mean, normally when I am on ediff mode I can hit n and it shows the next changes or N to view the previous changes... right now I can't do that#2019-01-1021:06aisamuIs the control window focused?#2019-01-1022:35practicalli-johnny@mario.cordova.862 If you are using ediff with two files (for example, SPC f e D to compare .spacemacs with its template), then windows 1 and 2 are normal text buffers. Window 3 is the ediff control buffer, a small window underneath the other text buffers, with the text Type ? for help. The ediff controls, eg. n or p only work when the cursor is in window 3, the ediff buffer.
If you close the window that contains the ediff controls, you should be able to open that buffer again using the buffer list, SPC b b. When the ediff controls are open again, select that buffer and press one of the ediff control keybindings, e.g. n. This should move the ediff window to the bottom again with both text buffers being compared shown above. This at least worked for me, on develop with Emacs 27.0.50#2019-01-1022:43Mario C.@jr0cket Just tried it! Worked like a charm! Thanks! This always throws me off and I have to quit ediff session and start over#2019-01-1022:48practicalli-johnnyIt was a useful thing to figure out as I am sure I will do the same thing myself one day, so good to know how to recover an ediff session. Thanks#2019-01-1120:47Drew Verleedotspacmacs/user-config is the right place to add code that would change behavior for something like indentation right?#2019-01-1219:26practicalli-johnny@drewverlee yes. You will probably need to use a hook for the particular mode (or modes) so you indentation config loads when that mode does. For example this indentation for the web mode
https://gist.github.com/jr0cket/3bef332bc8565f59086af1863e0a8b15#file-spacemacs-el-L784#2019-01-1219:31Drew VerleeThanks!#2019-01-1219:31practicalli-johnnyOr you can use an inline function too https://gist.github.com/jr0cket/3bef332bc8565f59086af1863e0a8b15#file-spacemacs-el-L651#2019-01-1700:51agusing lambdas for hooks makes it difficult to remove them though#2019-01-1219:33practicalli-johnnyThere are a few example do adding hooks in that config, so pick whatever works. If it doesnāt works, you might have to restart Emacs so the mode loads again. If it still doesnāt work, then maybe the mode name is not quite right (there are several modes for Clojure, the REPL, etc).#2019-01-1621:54Mario C.I am doing a merge and I got into a peculiar situation where I need changes in A and I also need the changes in B. Is going into Window 3 and manually editing the variants the proper way to go about this?#2019-01-1710:17David PhamIs there a way to completely deactivate evil-mode?#2019-01-1710:17David Phamin space macs?#2019-01-1712:49practicalli-johnnyEdit your .spacemacs file and change the line
dotspacemacs-editing-style 'vim
to
dotspacemacs-editing-style 'emacs
I assume you will need to restart Spacemacs for this to take effect.#2019-01-1712:48reefersleepIām connecting to a postgresql database via spacemacs/SQLi, which is awesome! However, some of our columns have long strings of text, which seriously slows down emacs. Is there anything I can do to amend this (other than not viewing those columns in emacs)?#2019-01-1718:29agif you use org-mode and ob-sql you can eval your sql queries and you can force it to be raw format, that way it wonāt output it in a table#2019-01-1719:58aghereās an example:
#+begin_src sql :engine "postgresql" :dbhost "localhost" :database "cc" :dbuser "cc_user" :dbpassword "password" :results table
select * users limit 10;
#+end_src
This will output it in table, but you can change the header to be raw or something like that#2019-01-1712:49reefersleepI just selected 5 random rows and it made the buffer ~24.000 columns wide.#2019-01-2007:27farzanahow i enable paredit mode in spacemacs, i use 'enable-paredit-mode' for this for each file. but i want to enable paredit mode permanently#2019-01-2007:38spfeifferHi, i cannot give you the exact syntax from the top of my head from my phone, but there are hooks for opening different filetypes where you can call functions, in those hooks you can enable modes, you put them in your spacemacs config file.#2019-01-2007:40spfeifferHere is an exacple for another mode: https://github.com/syl20bnr/spacemacs/issues/7693#issuecomment-259373212#2019-01-2012:22practicalli-johnny@jaharapi Instead of using paredit, I would encourage you to try *smartparens*, which is already part of the Clojure layer. Paredit was last updated in December 2014.
Smartparens in strict mode works just like paredit and for more than just lisp languages too. You can enable smartparents in your .spacemacs file
dotspacemacs-smartparens-strict-mode t
dotspacemacs-smart-closing-parenthesis t
More details here: https://practicalli.github.io/spacemacs/install-spacemacs/smartparens.html
The *lisp* state, SPC k, provides a very powerful set of tools for structured editing using smartparens
If you are using Evil (Vim) style editing and are using the develop branch of Spacemacs, then enabling Evil safe structural editing is recommended
https://practicalli.github.io/spacemacs/install-spacemacs/evil-structural-editing.html#2019-01-2012:29practicalli-johnnyIf you prefer to have the paredit keybindings back (and prefer Emacs style keybindings) there are examples on this website that you could just add to the dotspacemacs/user-config section of your .spacemacs file.
https://joyheron.com/post/sketchnote/clojure-meetup/2017/08/17/spacemacs.html#2019-01-2015:34farzanathanks and i also want my paredit keybinding back#2019-01-2015:34farzanajust switch to prelude to spacemacs#2019-01-2015:35farzanaevil mode is still too evil for me#2019-01-2103:24plexuswhat do people do to copy multiple consecutive s-expressions? I've mostly been using ya( or yi( but if you give those a prefix they will match ever greater surrounding forms, rather than consecutive forms...#2019-01-2109:17kommen@plexus I use y3L which copies 3 sexps, where L maps to evil-cp-forward-sp in my spacemacs config#2019-01-2111:00romainI just discovered lsp-mode and it seems attractive, do you use it with spacemacs or emacs in general for clojure developpment?#2019-01-2116:58n2oSmall question about formatting: Is it possible to change the way code is being formatted? I am not quite sure which plugin is responsible for it, so I don't know where to look it up.
For example:
(defui Actual
static om/IQuery
(query [this]
[])) ;; <-- too many spaces
(defui Expected
static om/IQuery
(query [this]
[])) ;; should treat it the same as a function definition
I want the second version. In Cursive it is possible to tell the IDE how the macro, which is not known to the IDE, should be interpreted in terms of indentation.#2019-01-2207:51agIndentation in clojure-mode is controlled by changing clojure-indent-style - read description of that function and CIDER documentation for more. But I would recommend keeping default value which I think is 'always-align'. And then when you press , fl - it would nicely realign things that are misaligned.
You can also specifically make different forms to align differently but that will probably make lein cljfmt and similar tools to yell at you.
(dolist (form '(re-frame.core/reg-sub
re-frame.core/reg-fx
re-frame.core/reg-sub
re-frame.core/reg-event-fx
re-frame.core/reg-event-db))
(put-clojure-indent form 1))
#2019-01-2207:55agIād say just donāt worry about it and simply use the defaults. Conventions exists for reasons. In your example it could be something like:
(query
[this]
,,,)
#2019-01-2211:23n2oI totally agree that one should stick to the conventions, but I think this formatting is not really correct. Cursive handles it the way I described it and this is what I like. Also it would be great to change it just to follow the same style guide. In our team we have users using Emacs and others use IntelliJ. When use auto-formattinc, lines are touched which just have not been changed -- just the configured indentation was different between these IDEs...#2019-01-2416:34Mario C.How do I get an ediff session only on one side of the window?#2019-01-2416:35Mario C.Normally I want the opposite behavior. To have the ediff session take up the whole emacs window. And it never happens. Always opens up 3 small windows in one buffer. Now that I want this behavior it suddenly decides to just hog up the whole window lol#2019-01-2416:39Mario C.| window A | ediff session here |#2019-01-2418:56agI am really confused hereā¦
Maybe youāre mixing up terms: buffer, window and frame and what they mean in Emacs, not sure#2019-01-2419:03Mario C.I know a window can have many buffers. I am not too sure what a frame is#2019-01-2419:06agframe is what holds windows (I know itās opposite of what we know from other apps). Itās been historically called that way. So if you for example start Spacemacs and do something like SPC w V - it will split a single window into two. One frame containing two windows.
if you do SPC F n - it will create a new frame#2019-01-2419:09agnow to answer your question⦠you want to have ediff session to be contained in a single window. Even if thatās possible, probably it would be unwise to have it like that.
Ediff (in its simplest form) has basically: side-A, side-B and ediff-control - 3 windows.#2019-01-2419:09agSo if you open new ediff session it will create new window configuration#2019-01-2419:09agand thatās normal.#2019-01-2419:10agif that annoys you maybe you can create it in a different frame - but I donāt think it would be less annoying, unless you have multiple monitors#2019-01-2419:15agtbh. In the beginning I was relying on Ediff all the time, but then slowly I started using magitās excellent diff view more and more. And now I very rarely fire up ediff (sometimes it comes handy) and itās so easy to start it - just press e in a magit diff#2019-01-2419:20Mario C.When I would run an ediff session it would open it like this.
| Window 1 | Window 2 | Window 3 |
| | Window 4 |#2019-01-2419:20Mario C.where window 2-4 are the ediff#2019-01-2419:20Mario C.I guess what I am asking is how do I keep it from taking over the entire frame#2019-01-2419:23agread about ediff-toggle-multiframe
here https://www.gnu.org/software/emacs/manual/html_mono/ediff.html#2019-01-2419:23agĀÆ\(ć)/ĀÆ#2019-01-2419:29Mario C.It used to always open the way I am describing but idk what I am doing differently now. And the toggle multiframe was kinda buggy and not really what I wanted. Oh well its not a big deal but it would have made my life easier lol.#2019-01-2516:03peter-kehlHi.
What's an easy way to auto restore the same buffers, and have same window layout, at spacemacs' startup? https://github.com/Bad-ptr/persp-mode.el or anything better, please?#2019-01-2519:13ag@peter.kehl set dotspacemacs-auto-resume-layouts to t#2019-01-2520:52peter-kehl@ag Thank you.#2019-01-2604:33vxehow to disable undo-tree? I tried to setq C-/ to undo and spacemacs rudely ignores me#2019-01-2604:55vxe#2019-01-2612:22practicalli-johnnyI dont know how I missed the auto-resume layouts setting. I had just been restarting with`SPC q r` or loading my layouts, SPC l L if I quit Spacemacs. Thanks ag.#2019-01-2720:32theeternalpulseWhere in spacemacs is the configuration for evil navigation in the various minibuffers (describe functions, ivy, swiper, etc) I tried evil-want-minibuffer but certain navigation using C-j, C-k doesn't work by default#2019-01-2720:32theeternalpulsethis is on a fresh config that i'm working on#2019-01-2818:16Drew Verleeanyone have any luck ignoring files on a per project basis?
Here is what i tired:
1. create a .proejctile file in the base of my project
2. add the line -/*.js to it
3. stage and commit it run command projectile-replace
4. i still see .js files#2019-01-2818:26ag.gitignore should do, no?#2019-01-2818:29agalso peeking into elisp code it seems it tries to use ag, ack and then git-grep (in that order). So maybe .agignore helps?#2019-01-2819:20Drew Verleei can't gitignore these files because there important to the project.
Maybe i can just ignore while replacing? is there an option for "no to everything in this file"#2019-01-2819:21agtbh. I am not following what youāve just typed.#2019-01-2819:22agfor global replace what I usually do is search for something, then in search results Iād press C-c C-e and then use iEdit or multiple cursors, then commit my changes#2019-01-2820:20mccraigmccraigI got it to work for my case (mostly projectile-ag) a while back @U0DJ4T5U1... i had to make some changes to spacemacs menus iirc... will look up details when I'm back behind a keyboard #2019-01-2820:30Drew Verleemostly i wanted search and replace to work. most other cases i can ignore the other files#2019-01-2820:47mccraigmccraigi was just after search, but there may be a similar solution for search/replace - i ended up replacing the default <sap> binding, 'cos the default binding was ignoring the projectile exclusions - this went in dotspacemacs/userconfig : https://gist.github.com/mccraigmccraig/81c2e94d50824306b3c0245c99a26e1e#2019-02-0119:48bfayIs there a keybinding to exit a search you started with /?
When I'm tired of seeing my search results highlighted, I usually just type in a random search that I know won't find a match, like /awefadsf
But recently I've been getting issues when I'm stuck in that mode; d deletes a whole line for some reason. I can fix by running evil-ex-search-exit but that's hard to remember#2019-02-0119:51jeff.terrellIn general, C-g exits your current context in Spacemacs. (I think in Emacs too.)#2019-02-0119:51jeff.terrellAlso, SPC s c clears your most recent search string from being highlighted in your buffer.#2019-02-0119:56bfayAh thanks, I think SPC s c is what I need; I had tried C-g, fd, ESC, and C-[ and none of those were working#2019-02-0120:27df-bk@bfay that sounds like this bug: https://github.com/syl20bnr/spacemacs/issues/10410#2019-02-0120:28df-bkthe workaround about halfway down fixes it for me#2019-02-0120:29bfayYeah! That does sound like the behavior I was seeing#2019-02-0121:36ag> When Iām tired of seeing my search results highlighted, I usually just type in a random search that I know wonāt find a match, like /awefadsf
@bfay you can do :nohl or SPC sc#2019-02-0121:37bfayThanks, yeah jeff.terrell got me covered!#2019-02-0415:48pabloreHow can I configure my spacemacs to activate parinfer-mode on every clojure file? I have to do it manually for every file.#2019-02-0417:59zane@U7V9HE682 You'll want to add a hook in your dotspacemacs/user-config. Here's more information about hooks: https://www.gnu.org/software/emacs/manual/html_node/emacs/Hooks.html#2019-02-0615:14pabloreItās weird, because seeing the code for the Clojure layer, it is adding parinfer to itās hooks#2019-02-0519:24Mario C.If I get an exception in repl (CIDER) it duplicates my windows. Is this a bug or am I doing something wrong? Is this expected?#2019-02-0519:34agquickly press SPC w u and hope nobody sees that#2019-02-0519:34agand stop writing clojure that throws exceptions. Thatās not idiomatic Clojure š#2019-02-0519:52Mario C.I guess its known behavior?#2019-02-0521:57practicalli-johnnyIf errors duplicate the source code buffers, then it sounds like something is wrong. I get loads of Clojure code errors every day and all I get is a popup telling me the error message.#2019-02-0611:16agigao+1, same here. Havenāt dived into this problem though.#2019-02-0615:24Mario C.I get the pop up too but it also multiplies the source code buffers (windows?). It doesn't happen each and every time but it happens often enough that I decided to ask around. SPC w u does the trick though#2019-02-0618:40Bravidoes anyone know how to use clj-refactor with spacemacs?#2019-02-0618:40BraviIāve added it to my dotspacemacs-additional-packages#2019-02-0618:41Braviand when I do cider-jack-in, the refactor menu doesnāt show up anywhere#2019-02-0618:42aghttps://github.com/syl20bnr/spacemacs/blob/develop/layers/+lang/clojure/README.org#L80#2019-02-0618:58Bravihmm#2019-02-0618:59BraviI was looking at this
https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/clojure#2019-02-0618:59Braviand itās only now that I realised that I was looking at master branch version of that page#2019-02-0618:59Bravidamn it#2019-02-0619:06Bravithanks @ag#2019-02-1109:57reefersleepIs there anyone here whoās also having problems with copying nordic characters from spacemacs in MacOs?#2019-02-1109:58reefersleepIāve got the following in my .spacemacs:
(defun copy-from-osx ()
(shell-command-to-string "pbpaste"))
(defun paste-to-osx (text &optional push)
(let ((process-connection-type nil))
(let ((proc (start-process "pbcopy" "*Messages*" "pbcopy")))
(process-send-string proc text)
(process-send-eof proc))))
(setq interprogram-cut-function 'paste-to-osx) ;; Paste from system clipboard
(setq interprogram-paste-function 'copy-from-osx) ;; Copy to system clipboard
#2019-02-1110:00reefersleepIt works great for ASCII chars, but if for example I try to yank this line:
Du mÄ fÄ rødgrød med fløde og ærter
and paste it here, it becomes:
Du mā⢠fā⢠rāādgrāād med flāāde og ā¶rter#2019-02-1110:02reefersleepIāve tried changing my āCoding system for X selectionā to utf-8-ndf-macā, āutf-8-hfs-macā and a number of other options, and it seems to make no difference.#2019-02-1222:46caleb.macdonaldblackHi, I'm new to spacemacs. After switching to my repl with ' s s. How can I make it go away without killing it?#2019-02-1222:58agwhat do you mean? you mean window to disappear? SPC w d
you mean jump back to the clj buffer? , s s
you want to āburyā buffer but keep the window split? M-x bury-buffer#2019-02-1223:00agor because you pressed , s s, it created a split window and put cursor into repl buffer you simply want to restore your previous window config? Then you can do SPC w u#2019-02-1301:31caleb.macdonaldblack@U0G75ARHC Yeah I wanted it to go away but not close my repl. SPC b d was what I was using and it wanted to close it. SPC w d is what I needed. Thank you#2019-02-1301:35agIf I can suggest - watch āSpacemacs ABCā on youtube. Itās old but itāll give you an idea about how Spacemacs features are structured.#2019-02-1301:36agthen you can do the same thing yourself - explore keybindings starting with Aā¦#2019-02-1302:51practicalli-johnnyYou could also do SPC w u to undo the last window operation (i.e. opening the REPL buffer).
Unless you are doing side effect code (e.g. println) I suggest evaluating code directly in the editor using , e f to evaluate the outer most expression you are in, or , e e to evaluate the expression before the cursor. I rarely use the REPL buffer directly, especially as I learnt how to debug simply with , d b.
Note, if you are not using Vim normal state, then replace the , with M-RET in the keybindings above.#2019-02-1306:06caleb.macdonaldblackThanks for the tips. Yeah I'm using Vim but I'm aware of the emacs keybindings too. It's all quite overwhelming but I'll get there. Ill definitely take a look at that video @U0G75ARHC, I'll need it haha.#2019-02-1306:30agMy pleasure @U3XCG2GBZ and welcome to the dark side, haha. Yes, Emacs can be quite overwhelming - just be patient. Even when things feel incredibly frustrating know this: āthat frustration probably fixable and if youāre persistent - at some point youāll find a way to fix itā. Donāt be shy asking questions - no matter how crazy your ideas may sound. I hope soon you will learn that even craziest of ideas can be done. You can address them here, in Spacemacs Gitter channel, r/emacs subreddit, in emacs.stackexchange - Emacsen are always nice and eager to help. Good luck#2019-02-1306:35agThe point of me telling you to watch that video is not to learn all the keybindings - there are literally over thousand of those. No, I just want you to know whatās available there.#2019-02-1306:36caleb.macdonaldblackDw that makes sense. š thanks#2019-02-1311:29practicalli-johnny@U3XCG2GBZ I'm also working on a book for Clojure development with Spacemacs, detailing the most common approaches and useful tools and commands as I discover them
https://practicalli.github.io/spacemacs/#2019-02-1311:38caleb.macdonaldblack@U05254DQM Ah yeah, I've actually stumbled across that a few times already through google. It's been really helpful.#2019-02-1400:40practicalli-johnnyThanks for the feedback on the book. I updated a few of the other pages on installing too while I was updating the org layer name.#2019-02-1312:39caleb.macdonaldblackI've installed org-mode and I don't have any keybinding for tables. Any idea what I've done wrong or how I can bring them in?#2019-02-1317:43aghow did you āinstallā it? I presume you have added org layer. be aware that org-mode also comes pre-bundled with Emacs by default, so it might be using older version. Run M-x org-version and make sure itās > 9#2019-02-1317:44agmost table related keys should be under , t#2019-02-1318:13agif you donāt hate watching video tutorials, you totally should find āGetting yourself organized with OrgModeā series on youtube by Rainer. Those are incredibly good#2019-02-1318:17agorg-mode is truly incredible. I do many things with Org-mode, sometimes even fairly unexpected things - like managing my dotfiles or using it to query postgres.#2019-02-1322:39caleb.macdonaldblackI installed org-mode by uncommenting org from dotspacemacs-configuration-layers#2019-02-1322:40caleb.macdonaldblackmy org-version is 9.2.1#2019-02-1322:40caleb.macdonaldblackhitting , t gives me `, t is undefinded#2019-02-1322:40caleb.macdonaldblackI can see all the commands for table and use them also. There are just no keybindings for them#2019-02-1322:44caleb.macdonaldblackI was in a markdown file not and a .org file š©#2019-02-1419:06aghey friends, can you please help me to get tiny pr noticed by maintainers. https://github.com/clojure-emacs/cider/pull/2583
This thing has been bugging me for a long time. Once this gets accepted and merged I will submit a fix for Spacemacs#2019-02-1419:07agby āhelpā I mean vote with an emoticon#2019-02-1419:22agIn case If youāre curious why Spacemacs needs a separate PR. Basically when in Spacemacs you do g g or , g d - it uses so called spacemacs-jump-handlers. At some point working in Cljs project I got annoyed with cider-find-var (it didnāt support Cljs at all) also I wanted to jump to definition even when not jacked-in. I made it so it would fallback to dumb-jump whenever it fails to use cider-find-var. It would be fair to say that find-var works better in Spacemacs than in vanilla Emacs with cider. But it currently doesnāt have a way to open definition in other window. I have a fix but without the aforementioned fix for cider - itās almost useless.#2019-02-1503:16theeternalpulseI was wondering if a lot of the custom functions of spacemacs are available as a standalone package?#2019-02-1517:45agitās difficult to specify and group together different things that gone into spacemacs.
Most of the time itās even hard to see them outside of Spacemacs context.
Although very often things get extracted into their own packages, even though they rarely used in vanilla Emacs setting.#2019-02-1518:17agBut I would be curios to see if anyone makes a way to consume a whole Spacemacs layer outside of Spacemacs ecosystem.
That could drive the quantity and quality of layers.#2019-02-1518:45theeternalpulseyeah, I'm working on migrating to a custom emacs.d and have found there's quite a bit of functions that are from spacemacs that I pick apart or take wholesale#2019-02-1503:17theeternalpulsemainly common functions that can be used in any config file.#2019-02-1518:56agHoly shit, new Transient thing by @magit_emacs breaks a bunch of things. I would suggest try not to update packages if you use magit#2019-02-1519:33jeff.terrellGood to know, thanks.#2019-02-1520:37agThis is I think the issue to keep an eye on https://github.com/syl20bnr/spacemacs/issues/11978#2019-02-1718:28prncHi everyone, what's a recipe for sane evil + parentheses interaction in spacemacs for someone coming from vim?
in particular, I've tried:
* evil-cleverparens--no go x throws exception: https://github.com/luxbock/evil-cleverparens/issues/66 and some other issues
* evil-smartparens--`daW`, caW don't respect parentheses
are there any other options you've succesfully?#2019-02-1718:31prncnext one to check lispy + lispyville...#2019-02-1720:09kirill.salykinLispyville works fine for me#2019-02-1814:32jeff.terrell@prnc - Did you try the evil-lisp-state stuff that's built into Spacemacs (in the SPC k menu)?#2019-02-1814:55kirill.salykinevil-lisp-state seems to verbose
lispyvill way more terse#2019-02-1817:49prnc@jeff.terrell yeah, I'm using evil-lisp-state for wrangling parentheses, all your slurping, wrapping, barfing etc. what I miss is good support of vim editing commands in the context of lisp, e.g. caW being aware that parentheses are not part of the W*ord etc., leaving the point in the right place for further editing, otherwise it breaks vim editing flow#2019-02-1817:49prncso far I found lispyville to be the only one doing the right thing most of the time#2019-02-1919:27agfriends.. I made a PR to fix jump-handlers for Clojure modes.
https://github.com/syl20bnr/spacemacs/pull/12002
if not voted I think this could take quite some time to merge.#2019-02-2018:59theeternalpulseIf I'm not sure what layer a package in my 'package-selected-packages value comes from but I want to trim it down how would I go about that, like preventing load of packages on emacs load#2019-02-2019:01theeternalpulseI have about 315 installed packages#2019-02-2019:42agCleaning up package-selected-packages wouldnāt reduce the load time though. If you really want to speed up the startup time maybe check pdumper stuff. If you simply annoyed that it keeps appending to that list and keeps it in your config, there is a way to force it to be in a separate file#2019-02-2019:43ag(setq custom-file "~/.spacemacs.d/custom.el") (load custom-file)
#2019-02-2023:36theeternalpulseoh I know, I mean just reduce the amount of elements being loaded. I know that variable is only so it' won't delete them from the melpa folder#2019-02-2109:54practicalli-johnnyCurious to know if people think start-up time of Spacemacs is an issue for them. I have never experienced this problem myself (even now I have 300+ packages, 21 layouts and way to many files automatically opened (thanks to all my layouts). All this on a 4 year old laptop with only 8Gb ram (latest Ubuntu though).
I used to use 'emacsclient', but as I do most everything in Spacemacs (or chrome) then Emacs is always running and always fast.#2019-02-2110:34mccraigmccraigno issue for me - my emacs tends to stay running for weeks at a time anyway#2019-02-2111:06aisamuIt's quite alright once open, but restarting takes a significant amount of time.#2019-02-2114:58bjaI also use emacsclient. It seems speedy enough for me. My machine has 128gb of RAM and 24 cores though#2019-02-2115:02aisamuCome on, you could even run Atom with those specs#2019-02-2115:11Mario C.Never had issues with start up time. Coming from intelliJ there is just no comparison#2019-02-2118:11agI just checked. Iām currently pulling 396 packages, 88 of them are built-in into Emacs. Honestly I donāt understand when people say that Emacs is flaky or unstable. Any average Emacs user is a testament how stable the platform is, simply because they use more packages than any user of Atom, VSCode, IntelliJ, Sublime installs plugins. Can you even imagine Atom with over 150 plugins installed? It will make any (no matter how beefy) machine to crawl, if it would run at all.
Like that was not enough - probably nobody ever got paid to write those packages. Just think about it for a moment. The whole Emacs ecosystem defies any logic and breaks all possible Murphyās laws. Yet amazingly it works and certain features of it are literally light-years ahead of any other given editor or IDE.#2019-02-2120:51theeternalpulseI wouldn't say unstable, but a bit of a slower startup than I see with a personal config. I sometimes experience some issues that is hard to pinpoint due to the amount of packages that may or may not be interacting with each other. I've pared down to a personalized emacs.d with a lot of lessons learned from spacemacs (which for now I use mainly at work). As far as resource it doesn't take up much memory, about 214mb and other than a slower than what I think is normal startup it is pretty stable. The only things that are an issue are that there's just a lot of packages I haven't personally opted into (whether built in or spacemacs provided) that may or may not mesh with packages I manually add or other keybindings.#2019-02-2120:52theeternalpulseAlso unrelated to spacemacs itself, is it doesn't force you to completely understand emacs fully, which i think is necessary to use it pretty effectively beyond what is provided by spacemacs. Great documentation, but it is a pretty good contained distro if you're not looking to go galaxy brain on your ides#2019-02-2122:10Mario C.When running a merge ediff how do I accept both changes in buffer A & B? When I click + all I get is nil and nothing happens.#2019-02-2122:13agpress ? it should tell you, no?#2019-02-2122:13Mario C.It does and it says to press +#2019-02-2122:14agwhatās that bind to? can you do C-h k +?#2019-02-2122:17Mario C.>+ runs the command evil-next-line-first-non-blank (found in evil-motion-state-map)#2019-02-2122:19agno⦠it should say ediff specific binding⦠maybe evil simply overrides it. Try switching the mode C-z and do it again#2019-02-2122:20Mario C.Did I need to do that in the ediff session?#2019-02-2122:20agyeah in ediff control buffer.#2019-02-2122:21Mario C.+ runs the command ediff-combine-diffs (found in ediff-mode-map), which is an
interactive compiled Lisp function in āediff-merg.elā.
It is bound to +.
#2019-02-2122:22Mario C.Perhaps it doesn't know how to handle the case of combining which is why it returns nil?#2019-02-2122:23agreading docstring it says:
Combining is done according to the specifications in variable
ediff-combination-pattern.
#2019-02-2122:32Mario C.yea I didn't really understand so I am just editing the buffer manually š
#2019-02-2220:13bfayIs there a smartparens setting to ensure you don't delete one half of a parenthesis pair and leave the other one hanging?
Right now I can always delete one paren with x. For the most part that hasn't given me problems, but I thought smartparens-strict-mode would change the behavior and it doesn't seem to#2019-02-2220:28devo(spacemacs/toggle-evil-safe-lisp-structural-editing-on) I think. It will delete both parens if you use x though.#2019-02-2220:31bfaythanks, yeah that's what I was thinking of#2019-02-2509:22Andrea Imparatohello, anybody here knows how to "remove" the default theme in spacemacs? I mean, how to not use any theme at all? Not even the default one?#2019-02-2509:28Andrea ImparatoI'd like to use something like:
(add-to-list 'default-frame-alist '(foreground-color . "green"))
(add-to-list 'default-frame-alist '(background-color . "black"))
#2019-02-2509:28Andrea Imparato(I love the default theme š )#2019-02-2517:27prncDoes anyone now how to achieve isolation between layouts (perspectives) in spacemacs, I like it but it seems that whenever I want to e.g. switch to alternate-buffer it doesn't respect layout/perspective boundries, is that the expected behaviour? cheers!#2019-02-2602:47zaneI believe so. My understanding is only the *-perspective-* variants like helm-projectile-switch-to-buffer respect perspective boundaries.#2019-02-2609:13practicalli-johnnySPC TAB did not previously respect layouts, but it does now switch to a previous buffer in the current layout in develop branch (last updated 18th February 2019).
Or you could use SPC b p#2019-02-2613:03lemonsHeya, I just updated to clojure 1.10 and lines with errors are no longer highlighted in the editor. Anyone else seeing this?#2019-02-2613:04lemonsI see a cider popup with a CompilerException, it has all the needed information#2019-02-2722:03theeternalpulseis the "Layouts Transient State" just a hydra with dynamic display of the current layout?#2019-03-0116:31Mario C.Yesterday I was able to use , g d to jump to the definition of a function without a problem but today when I tried running the command a mini buffer is asking to enter a Symbol. What gives? How do I go back to the previous behavior?#2019-03-0116:35Mario C.Also is there any shortcut to go back to where you jumped from? Say I ran a successful , g d and jumped to the definition and now I want to go back to where I jumped from. I know you can set a mark before jumping and then use <backtick><mark>#2019-03-0203:09zaneI think , g b ("go back") works for this as well.#2019-03-0116:36agC-o#2019-03-0116:41Mario C.gnarly it works now.#2019-03-0116:42Mario C.The only thing I did as a hail mary was load current namespace into the repl.#2019-03-0116:42Mario C.SPC m s b#2019-03-0119:33Mario C.Is it possible to highlight a region then search that buffer for other instances of the highlighted region?#2019-03-0119:34ag*#2019-03-0119:34ag# if you need backwards search#2019-03-0119:35agSPC tha turns auto symbol highlight#2019-03-0119:35Mario C.wow thats beautiful! Thanks! Ive been looking for this functionality#2019-03-0119:39ag(with-eval-after-load 'auto-highlight-symbol
(spacemacs/toggle-automatic-symbol-highlight-on))
Add that to your config if you want it to be enabled by default#2019-03-0120:15theeternalpulseI missed out on the magit/transient talks, is there a simple keybinding script I can add to get the evil bindings for the transient mode#2019-03-0120:59agafaik Spacemacs in develop branch almost fully supports transient. evil-magit project added support for it as well#2019-03-0121:09aganything in particular you have a problem with?#2019-03-0220:20theeternalpulseI sitll have to use C-g to exit, q doesn't seem to work#2019-03-0220:41ag(define-key transient-map "q" #'transient-quit-all)
#2019-03-0423:36aria42After going to Cider 21.0 having a ClojureScript issue, My Cider window is always pending-cljs even though I'm connecting to localhost:3449. Anyone know#2019-03-0506:02kommen@aria42 a good first step is to ensure that the other dependencies are up to date, like piggieback and nrepl#2019-03-0516:00Drew Verleehas anyone successfully ignored files to be searched when using projectile-replace i recall trying everything listed in the docs and nothing stops huge files (logs, etc...) from being searched. makes the convince of the function useless.#2019-03-0516:44practicalli-johnny@drewverlee hmm, the projectile-replace function doesn't seem to work at all for me (Spacemacs develop). After specifying the find and replace values I get a prompt that doesn't respond to anything except help and .
I'll stick to hacking the search results in a separate buffer, that works okay for me.#2019-03-0518:02agIf you havenāt tried I recommend adding this package https://github.com/Wilfred/helpful. Whenever questions similar to this arise I quickly run helpful-symbol, find the source and simply read the code. I checked projectile-replace it seems to be calling projectile-files-with-string, docstring of which states:
> Tries to use ag, ack, git-grep, and grep in that order.
Meaning things like .agignore should work. But do not blindly trust docstrings, sometimes they do lie#2019-03-0518:53Drew VerleeThanks @jr0cket and @ag!#2019-03-2711:42practicalli-johnny@romain be careful which Emacs release you use, not all are equal. When I had to use a Mac at work, I install Emacs from https://emacsformacosx.com/#2019-03-2711:42practicalli-johnnyThat worked very well with Spacemacs#2019-03-2711:43romainI moved back to emacs-plus and will not use tooltip at the moment. I never tried emacsformacosx, I don't know how it compares to emacs-plus#2019-03-2712:07practicalli-johnnyall I know is that emacsformacosx doesnt mess around with Emacs libraries, it just gives you the standard Emacs release. Its a pretty safe approach. I havent use MacOSX for several years now, so I am not aware if there is anything better.#2019-03-2712:07practicalli-johnnyThe Spacemacs docs for macosx are here https://github.com/syl20bnr/spacemacs#macos#2019-03-2712:09romainOh it's cool, homebrew is using emacsformacosx when installed with cask#2019-03-2712:09romainWill give it a try š#2019-03-2721:09agemacs-plus is basically GNU Emacs as is, itās not a port, it adds small things like Spacemacs icon (you can opt out of it) and additional flags like --HEAD and --devel. OTOH emacsformacosx adds some patches that supposedly should make it work better in OSX, In my experience though I had a few cases where it would either die unexpectedly or would get really sluggish.#2019-03-2806:23agigaoI tried emacs-plus and compared to emacsformacosx it felt dreadfully slow.#2019-03-2820:53agYou know what? I didnāt want to be skeptical without a proof and I have removed emacs-plus, nuked elpa and .cache in .emacs.d. Installed brew cask install emacs. It does feel a bit faster. And magit-forge worked (it breaks in emacs-plus).#2019-03-2820:55agI donāt remember exactly why long time ago I had to leave it for emacs-plus formula.
I guess Iām gonna give it another try, hope I wonāt have issues now.#2019-03-2911:53kommenI can also suggest to give https://bitbucket.org/mituharu/emacs-mac a try.#2019-03-3003:48agshiiit⦠brew cask install emacs is incredibly slow when working with magit. I have no idea why. Iām moving back to emacs-plus#2019-03-3003:52agand for the future reference https://emacs.stackexchange.com/questions/271/what-is-the-difference-between-aquamacs-and-other-mac-versions-of-emacs#2019-03-2811:41Igor GarciaHello, guys my spacemacs is freezing on cider-jack-in, something similar to https://github.com/clojure-emacs/cider/issues/1314 - I can only get out of the loop with C-g and it doesn't seem to affect functionality but it's a bit annoying. It started about 3-4 weeks ago and I've been trying to find the problem and fix it myself but couldn't make progress. I even re-installed everything from scratch but the problem persists. Any tips? I'm on the master branch, cider 20190326.1752 - (also should I post it on #cider instead? ).#2019-03-2811:44Igor GarciaI've just noticed it seems to be project-related. A newly created project (with lein) connects OK, no freezes. š#2019-03-2811:52Igor GarciaFixed! It's a relatively old luminus project, I've fixed it via upgrading lib luminus-nreplfrom 0.1.4 to 0.1.6. I wish I had tried that earlier.#2019-03-2811:55practicalli-johnny@U0646TENN nice find. Versions of nrepl, plugins and Leiningen can easily break things. I had Leinigen 2.9.1 break my compojure-api project yesterday. It was reporting issues with the spec of fn, so was a bit tricky to figure out š#2019-03-2821:05bfayHmm I was getting that last week and have no idea why. I ended up reinstalling emacs (using the emacs for osx site linked earlier above), upgrading lein, eventually tried deleting my .emacs.d repo, recloning, and switching to the develop branch.
And ummm... now everything is fine I think#2019-03-2814:59Daniel HinesWhen I run Emacs as an app on both Mac and Windows, I can increase the font size of a buffer with Space z x +. When i run Emacs from the terminal, that command doesn't do anything (it seems not to run actually). How do I increase font size within the terminal?#2019-03-2815:14didibusI think in a Terminal, you need to increase the font of your terminal.#2019-03-2815:15didibusUsing wtv mechanism the Termnial has to do so#2019-03-2815:49jeff.terrellYeah, that's right. On MacOS, command-plus is a pretty consistent way to increase the font size, and it works both in https://Terminal.app and https://iTerm.app.#2019-03-2816:30jeff.terrellOr I guess technically it's command-equals, but anywayā¦#2019-03-3105:03aghowever. it increases the font only in the current buffer. Thatās why I prefer to use SPC z f#2019-04-0112:24jeff.terrellI think if you're in a terminal, the font size is controlled by the terminal, not by emacs. I use SPC z f also when I use windowed emacs (which is basically every time), but they were asking about terminal emacs.#2019-03-2815:51Daniel HinesThanks!#2019-03-3113:07martinklepschHow can I permanently enable golden-ratio? https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#golden-ratio#2019-03-3115:55didibusAdd (golden-ratio-mode 1) to your user-config#2019-04-0115:55martinklepsch@didibus thanks!#2019-04-0115:56martinklepschI tried to configure the version control layer so that it shows me git info in the margins but git-gutter is not being enabled ā am I putting this in the wrong place?#2019-04-0116:03martinklepschduh, I think it actually works, I just looked at the wrong side of the buffer š#2019-04-0116:10martinklepschIf anyone knows how to get it to the left side of the buffer, that'd be fantastic but maybe I can also get used to this š#2019-04-0116:24ag@martinklepsch you mean git-gutter? (setq git-gutter-fr+-side 'left-fringe) maybe?#2019-04-0116:46practicalli-johnny@martinklepsch I find it useful to have git-gutter on the right so it does not blur into the evaluation marks, shown when ever an expression has been evaluated in the current repl.#2019-04-0117:53agDoes anyone find git-gutter to be slow or any other issues. I switched to diff-hl long time ago and I canāt remember why I did that. git log says nothing about it and my org files have no notion about what force me to do this.#2019-04-0117:54agit seems git-gutter is more popular (maybe due to familiar name)#2019-04-0212:30practicalli-johnny@ag I also use diff-hl but I seem to remember this is only because I prefer the style of markings in the margin that diff-hl makes. I will try git-gutter again, as I notice that it will show changes to the unsaved parts of the file too.
This is the relevant parts of my .spacemacs layer configuration
(git :variables
git-magit-status-fullscreen t
git-enable-github-support t
git-gutter-use-fringe t)
(version-control :variables
version-control-diff-tool 'diff-hl
version-control-global-margin t)
#2019-04-0215:33martinklepschHm, I really like the way diff-hl highlights things but staging hunks is also something that I'd use a lot ā from what I gather that only works with git-gutter?#2019-04-0216:00agYou can stage hunks and even individual lines in Magit#2019-04-0217:03martinklepschguess it's time for me to invest some time into this magit thing everyone is always talking about then š#2019-04-0217:59practicalli-johnnyI stage changes using magit status, SPC m s, use TAB to open changes on a file, use v to select lines within a hunk and s to stage.
You cant select correctly over a hunk boundary, you would need to do two separate selects
I occasionally do the same for staged changes if I have staged too much. u to un-stage.#2019-04-0307:52martinklepschThanks! I was missing the TAB bit and the visual selection thing#2019-04-0307:52martinklepschš#2019-04-0307:53martinklepschWhat's a common (or idiomatic keybinding given spacemacs setup) for slurping sexps?#2019-04-0307:54lispyclouds@martinklepsch im using the smartparens in spacemacs for this. SPC-k-s#2019-04-0307:55lispycloudsSPC-k-S for backwards and b and B for barfs#2019-04-0308:10martinklepsch@rahul080327 neat! Somehow I didn't find this before (and I did look š
)#2019-04-0309:54Andrea Imparatohello, has anybody ever tried to use pywal (https://github.com/dylanaraps/pywal) on osx and try to use the xresources-theme package?#2019-04-0317:57practicalli-johnny@martinklepsch lots of structural editing fun with Lisp state under SPC k https://github.com/syl20bnr/evil-lisp-state#2019-04-0318:02practicalli-johnny@ag I had a recent PR merged today for Clojure layer, so looks it like the maintainers may be catching up#2019-04-0318:05agyah, totally. Seems too many people complained about not having a release for almost a year. Thereās a lot of work they have to get done, I guess we can wait for a bit longer. Iām feeling good about new release, might even consider switching back to master when itās out#2019-04-0318:17practicalli-johnnyThere seem to be a couple of new maintainers. There are also planning more frequent point releases and using a nice tagging system to highlight changes for a release.#2019-04-0318:19agwhatās been bugging me for a long time - nobody closes old issues. There are so many issues that either incomplete or irrelevant or describing an upstream problem that may have been already fixed#2019-04-0319:15martinklepschThanks @jr0cket - lisp state looks great. My current usage has mostly been just slurp (believe it or not). I probably donāt need the extra state in most cases (ie just back to normal mode after slurp) but Iām sure there a way to make that work #2019-04-0319:22aghttps://github.com/agzam/dot-spacemacs/blob/master/layers/ag-general/keybindings.el#L74#2019-04-0319:40practicalli-johnnyI mostly use slurp, barf and raise (my new favourite). I sometimes use delete, but C-k is usually enough to cut an expression.#2019-04-0407:42martinklepsch@jr0cket do you use those exclusively from within the lisp-mode?#2019-04-0407:45practicalli-johnnyYes, I slurp/barf/raise from lisp state. Sometimes navigate code in lisp state too as hjkl navigate on s-exps boundaries, especially when I refactor code.#2019-04-0407:45martinklepschEnded up with this now
(spacemacs/set-leader-keys
",>" #'sp-slurp-hybrid-sexp)
Inspired by @ag's config#2019-04-0407:46martinklepsch> Sometimes navigate code in lisp state too
That sounds neat, didn't consider that moving around could be nice, but also sounds like something you have to get used to/learn first š
#2019-04-0407:46practicalli-johnnyLisp state felt more natural once I learned to love Evil mode - multi-mode editing#2019-04-0407:47martinklepschRight, it kind of makes sense when you think about it š#2019-04-0407:47martinklepschintersting stuff, I guess I'll try to play around with that a bit more#2019-04-0407:48martinklepschThanks for all the help here, very much appreciated š#2019-04-0407:50practicalli-johnnyOnce I switched to Evil mode (Vim), then I found Evil safe structural editing invaluable https://practicalli.github.io/spacemacs/install-spacemacs/evil-structural-editing.html#2019-04-0512:09romainIs it me or mu brew formula doesn't have --with-emacs to install mu4e?#2019-04-0516:51ag> mu4e is part of mu ā by installing the latter, the former is installed as well.
from: https://www.djcbsoftware.nl/code/mu/mu4e/Installation.html#2019-04-0517:28didibusI'm a bit different. All I use is raise sexp, backward, forward, up, down list/sexp, and expand/contract region.#2019-04-0517:29didibusSo I can easily select an sexp, then press ( or [ or { to wrap it around. And then use backward sexp to position the cursor where the fn goes (| (...))#2019-04-0517:30didibusIf I want to unwrap, I use raise#2019-04-0517:32didibusWith that, I can really quickly navigate the cursor around sexp, wrap them and unwrap them.#2019-04-0713:50practicalli-johnnyAs we've been talking about Lisp state, I have started using it more. I've now added SPC k t to transpose two expressions. Put the cursor at the start of the second expression and it will swap places (transpose) with the previous expression. Found this good for re-ordering unit test assertions and where I got the order of functional composition mixed up š#2019-04-0714:59lreadooooh this channel is a treasure trove! #2019-04-0715:08lreadWhen I decided to learn Clojure, my natural inclination was to go with Cursive because I was very familiar with IntelliJ. But then I figured why not explore emacs and see what all the fuss has been for all these years. I started with plain emacs but got frustrated with fiddling too much with my config. I was much happier when I found spacemacs - and my hands were much happier with evil mode.#2019-04-0715:16lreadEven after quite a bit of practice I still find myself stumbling a bit with āwhat.. how did I manage to get myself here?ā scenarios. I think avoiding the mouse and always switching back to normal state after making a change help a lot.#2019-04-0715:17lreadAnd thanks for your guides @jr0cket! They really helped and continue to help!#2019-04-0821:39Daniel HinesHow do you search and replace in spacemacs? * works nicely when itās a symbol, but I want an arbitrary string/regex. I see references to Alt + %, but that only prints āāā for me.#2019-04-0902:06didibusHum, I use spacemacs in non evil mode.#2019-04-0902:06didibusSo might be different for you#2019-04-0902:07didibusBut I do M-x anzu-query-replace#2019-04-0905:32practicalli-johnnySPC s e will start iedit mode and if you have some text selected it will let you change all instances. You can couple this with SPC n r, where you select a range of text and narrow to just working on that region. SPC n w to widen your narrow and see the whole file again.#2019-04-0823:10Mario C.@d4hines I usually do :%s/<regex>/<regex>/gc the gc flag is global search and asks you to confirm the search & replace.#2019-04-0823:10Mario C.Idk if that helps#2019-04-0902:37lreadI do same as @mario.cordova.862#2019-04-1021:47Daniel HinesFor the record, SPC s e is exactly what I wanted. Thanks @jr0cket!#2019-04-1202:39lreadThis might be more of a general emacs question, and probably a common one coming from someone who is used to IDEs, but this seems like a friendly room! Is there an easy way to dedicate a window to the REPL? I always want my REPL available in the same window. Even after I shut it down and start it up, Iād like it to automatically be in that same window. Is this an odd thing to want? Am I missing the Zen of emacs or something?#2019-04-1216:18didibusHave you heard of layoutsm#2019-04-1216:18didibuslayouts?#2019-04-1216:19didibushttps://github.com/syl20bnr/spacemacs/blob/develop/doc/DOCUMENTATION.org#layouts-and-workspaces#2019-04-1216:21didibusYou can save and load them to a file#2019-04-1218:16lreadthanks, I will take a peek!#2019-04-1202:49zaneNot weird at all. That's a pretty common desire.#2019-04-1202:50zaneThere are libraries that let you do that. I don't know if the libraries that ships with Spacemacs are enough for that, offhand.#2019-04-1202:52zaneThis is probably part of the answer? https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#saveload-layouts-into-a-file#2019-04-1202:54zaneMaybe also this layer? https://github.com/bmag/spacemacs-config/tree/master/layers/window-purpose#2019-04-1208:54practicalli-johnny@lee EDIT: Sorry, workspaces is not what you are looking for (now I read their docs again)#2019-04-1208:56practicalli-johnnyI never have the repl buffer open myself, I just eval in source code.#2019-04-1208:57practicalli-johnnyYou can tell Spacemacs to open the repl buffer when you jack-in (the Clojure layer switches this off) https://practicalli.github.io/spacemacs/clojure-repl/show-repl-on-connect.html
SPC w . opens the window transient state and is a very handy menu for moving windows around.#2019-04-1210:25practicalli-johnnyHelp. Anyone know why I can now only undo 3 times? I am using evil-mode and u to undo. Also looking at undo-tree-visualize, I only get three steps of history.
Update: I restarted and all is good again... not sure what I did#2019-04-1210:55lispyclouds@jr0cket Could be https://github.com/syl20bnr/spacemacs/issues/12110#2019-04-1211:15practicalli-johnnyThanks, I'll take a look this weekend and see if I can reproduce the issue.#2019-04-1211:48lreadThanks @zane, I will take a look at those. @jr0cket, thanks for sharing that you eval in source, thatās a good tip. I think it was one of your videos where I learned about evaling to comments, that was a happy moment. I am currently working on macros in cljs using figwheel main for tests - I am finding I need to see the repl buffer during this work to see compilation errors and debug-prn output. Also I am restarting the repl quite a bit for this type of work. Maybe for more normal work I wonāt find I need to see the repl buffer. #2019-04-1313:17practicalli-johnnySorry, ignore my suggestion about workspaces. I read their docs and its not what I thought.#2019-04-1403:53lreadoh thanks for letting me know!#2019-04-1211:51practicalli-johnnyI seem to used the browser dev console for errors that figwheel doesn't show, but can understand repl buffer is also useful for ClojureScript. Especially as it seems the Cider debugger doesn't work with cljs.#2019-04-1211:53practicalli-johnnyWith ClojureScript I eval a lot of swap! statement s to emulate state changes, usually define a handful at the end of the core code base.#2019-04-1211:54practicalli-johnnyThe more complex your cljs app, the more times it likely to need a refresh. I have been caught out by the browser cache sometimes too, where changes were not showing, making me restart without need.#2019-04-1516:11Mario C.Spacemacs keeps hanging and uses 100% CPU anytime I open a cljs file and do /swa. Without fail#2019-04-1516:23agwhatās your search tool? ag, grep, rg?#2019-04-1516:30Mario C.I believe its helm#2019-04-1516:30Mario C.If I do a SPC / it shows its using helm-ag#2019-04-1516:31agwhatās your dotspacemacs-search-tools is set to?#2019-04-1516:37Mario C.ag, pt, ack and grep#2019-06-0917:49kirill.salykin@jr0cket brilliant, thanks!#2019-06-0919:38didibusSo, after using only evil, for 2 days. One thing I struggle is that nothing seems as good as Emacs sexp functions for navigating Lisp code.#2019-06-0919:39didibusIt seems more focused on freeform text. You can move by word or WORD, by paragraph, and % moves between bracket#2019-06-0919:39didibusBut how do I move structurally around sexp?#2019-06-0919:39didibusLike say, left/right across sexp forms and up/down into and out of them?#2019-06-1002:34aisamulispyville and lispy have changed my life, even with rough corners!
motions that only navigate (e.g. lispyville-forward-sexp bound to L) and motions that navigate leaving you already on insert (`lispyville-backward-up-list` bound to () are very convenient!
As a heavy user of SPC k ... mode, I knew I had to do something once I saw a coworker using holy-mode.
It was the same feeling I had when I saw someone using emacs while I was still using Atom.#2019-06-1002:36didibusHaha, okay, so maybe I should try it. Because ya, as I see it, and always when I'm comparing myself to Evil coworkers, I am way more productive in Holy mode when working in Clojure. I can navigate in and out, back and forth, selections, etc. so easily. I'll give lispyville a swirl and see#2019-06-1002:36didibusthx#2019-06-1002:43aisamuThe installation wasn't super straightforward for an emacs beginner such as myself, so let me know if you'd like the config files!#2019-06-1003:09didibusWill do!#2019-06-1004:27ag@U1UQEM078 do you know if someone has built a layer?#2019-06-1004:27agwill definitely give it a try myself when I have a chance#2019-06-1012:03aisamu@U0G75ARHC I couldn't find one when tried, so I had to (poorly) write my own private layer for it š#2019-06-0919:43didibusBasically everything here: https://www.gnu.org/software/emacs/manual/html_node/elisp/List-Motion.html#2019-06-0922:08spfeifferYou mean transient lisp mode? š#2019-06-0922:13ag@didibus some claim that evil-cleverparens layer gives you some nice things, I yet have to try it myself. But as you know - Iām lazy.#2019-06-0922:14agalso checkout https://github.com/noctuid/lispyville#2019-06-0922:27didibusHum, so no native Vim#2019-06-0922:28didibussolution#2019-06-0922:28didibusHow do I access transient lisp mode?#2019-06-0922:30agSPC k ...#2019-06-0922:31didibusThat's not transient though#2019-06-0922:31didibusAlso, anyone else has SPC unbounded in lisp-state?#2019-06-0922:31didibusM-m still works, but not SPC#2019-06-0922:32didibusMaybe I'm used to Holy mode transient, normally transient refers to the use of Hydra#2019-06-0922:32didibusIn holy mode#2019-06-0922:39didibusAlso, how long did it take you to become more productive? Cause now I think I'm about 20 times less productive š#2019-06-0922:43agBe patient⦠nobody can expect to become fluent in Spanish in just a few days just by reading some Gabriel GarcĆa MĆ”rquez. Also, I think Iāve told you: āyouāre gonna hate me for a whileā#2019-06-0922:45didibusWe'll see if it pays off I guess. I did vimtutor, the free part of vimadventures#2019-06-0922:46didibusNow its about using it for real#2019-06-0922:47didibusThat's where I started really missing the emacs lisp features.#2019-06-0922:48didibusI don't find SPC k super useful, it takes so long to type SPC k before every move, and lisp-state disapears on Esc, so all insert mode gets you out of it#2019-06-0922:51didibusOkay, but isn't it abnormal that SPC and , are no longer bound in lisp state?#2019-06-0922:52didibusHow am I suppoed to run eval last sexp without , š#2019-06-0922:52didibusDo I have a broken setup?#2019-06-0922:53agevery Emacs user in some sense has a ābrokenā and at the same time āperfectā setup.#2019-06-0922:53agfind what makes sense for you#2019-06-0922:53agand change it to your needs#2019-06-0922:55agIām not a big fan of SPC k either, at some point Iād probably try to find something that works for me better#2019-06-0922:57agbut itās easy to extend. Hereās for example how I added SPC k = operator - it reindents things in current sexp:
(defun sp-reindent ()
(interactive)
(save-excursion
(er/expand-region 2)
(evil-indent (region-beginning) (region-end))))
(evil-lisp-state-enter-command sp-reindent)
(spacemacs/set-leader-keys
"k=" #'evil-lisp-state-sp-reindent))
#2019-06-0922:57didibusWell, I meant broken like, isn't Spacemacs supposed to have SPC bound in all states as the leader? Especially since evil-lisp-state is made by the same person, so I was wondering if that's a bug or my config has an issue#2019-06-0922:59didibusYa, my Emacs is highly customized. But right now I want to make sure I learn the Vi way, before I customize it. That's why I ask first if here are ways I'm just not thinking off before I create custom ones#2019-06-0923:00didibusLispy seems nice, abo-abo is an awesome Emacs dev too, I love all his packages. But I still think I need to practice pure Vi before I try these Emacs only packages#2019-06-0923:01ag> isnāt Spacemacs supposed to have SPC bound in all states as the leader
you are correct. Maybe thereās a ticket on GH, I donāt know.#2019-06-0923:01didibusI'll check#2019-06-0923:02didibusIf you do: SPC k . and then SPC, do you see: SPC is undefined ?#2019-06-0923:05agyes#2019-06-0923:05agthat is a bug#2019-06-0923:13agThere are ongoing discussions of moving evil-lisp-state into its own layer and making it optional, bringing lispyville to Spacemacs, etc. There isnāt a single best option that would work for everyone. Thatās why I personally choose not to worry about it hoping that community will fix it for me. Navigating and manipulating sexps is not a highest priority for me right now though.#2019-06-0923:16didibusHum... Ya, it would be nice to move it to a layer actually, and give people options there.#2019-06-0923:17didibusSo if you prefered cleverparens, lispyville, etc.#2019-06-0923:17aghttps://github.com/syl20bnr/spacemacs/issues/8162#2019-06-0923:17didibusBut abo-abo is amazing, so if one had to be default, I'd go with his š#2019-06-0923:18didibusI love all his packages: Ivy, Avy, Swiper, Counsel, all top notch. Maybe I should try lispy, in his readme, he mentions Vi line editing style isn't very good for Lisp, and I think that's what I'm realizing now. Writing Clojure is my #1 activity so... I'll see#2019-06-0923:18didibusI might just wait for the Spacemacs community as well š#2019-06-0923:19aghttps://github.com/noctuid/lispyville#2019-06-0923:19aghttps://github.com/syl20bnr/spacemacs/issues/6050#2019-06-1002:34aisamulispyville and lispy have changed my life, even with rough corners!
motions that only navigate (e.g. lispyville-forward-sexp bound to L) and motions that navigate leaving you already on insert (`lispyville-backward-up-list` bound to () are very convenient!
As a heavy user of SPC k ... mode, I knew I had to do something once I saw a coworker using holy-mode.
It was the same feeling I had when I saw someone using emacs while I was still using Atom.#2019-06-1000:54didibusthe comments on those issues don't make it sound supper promising#2019-06-1000:54didibusbest i saw was people using hybrid mode#2019-06-1000:55didibusbut, thats not really vi way anymore, if you live in insert mode#2019-06-1000:55didibusš#2019-06-1004:48didibusIt's me again š , is there a way in Evil to have j/k move into wrapped lines? For example, if you use up/down in insert mode, it moves through the wrapped lines. I find it very slow to have to navigate left/right into a wrapped line, even if I use w and b.#2019-06-1004:50agI think what you want is to spacemacs/toggle-visual-line-navigation (SPC t L)#2019-06-1004:50agif you want it on always:
(add-hook 'prog-mode-hook 'spacemacs/toggle-visual-line-navigation-on)
in dotspacemacs/user-config#2019-06-1004:54didibusYes that's it!#2019-06-1004:54didibusThanks#2019-06-1005:08didibusThink I found another bug, flyspell transient state, c seems to correct the previous word, the the one under point.#2019-06-1006:25agI personally did this:
(spacemacs/set-leader-keys "xx" #'flyspell-correct-at-point)#2019-06-1006:26agit allows me to SPC xx to fix the the word under cursor#2019-06-1006:30didibusCool, I'll keep that one in mind too!#2019-06-1006:34agyeah, if you need dictionaries, thesaurus, etc. check out my layer: https://github.com/agzam/dot-spacemacs/blob/315acdf2f84addeb3cb86fee00b3989b17f52c61/layers/ag-lang-tools/packages.el#2019-06-1005:10didibusIs there a better Evil command to correct the word at point?#2019-06-1005:11didibusLooks like C-M-i can be used in Evil#2019-06-1005:18didibusMy first practical use of guW yay!#2019-06-1005:20didibusAlso, another small question, would most Evilers do y4w or vwwwwy ?#2019-06-1012:17aisamuI'm terrible with counting, so vwwwwwy it is.
But the fastest for me is just moving the cursor normally and using whole-line(`yy`) or to-the-end-of-the-line (`Y`).
Both respect sexps if you toogle some config.#2019-06-1018:10didibusHum... what configs are those? I think that's what I'm missing?#2019-06-1018:11didibusOh, probably its lispyville#2019-06-1101:29aisamuhttps://github.com/luxbock/evil-cleverparens#2019-06-1101:31aisamuIIRC, this comes with spacemacs-evil#2019-06-1005:30didibusAnd another small question, can you repeat navigation? . seems to only repeat operators. But say I want to repeat fy is there a key for that?#2019-06-1005:44zaneYou can keep hitting f after fy to move on to subsequent occurrences of y.#2019-06-1005:45didibusAwesome!#2019-06-1005:45didibusAnd can I hit F to go back ?#2019-06-1005:46didibusOr do I need to do Fy ?#2019-06-1005:47didibusHum...#2019-06-1005:47didibusIt doesn't seem to work#2019-06-1005:47didibusIf I press f again, it doesn't repeat.#2019-06-1005:49didibusI tried in Vim as well, same behaviour.#2019-06-1005:49didibusDid you customize something?#2019-06-1005:49zaneWeird!#2019-06-1005:49zaneI certainly may have.#2019-06-1005:51didibushttps://stackoverflow.com/questions/10340562/vim-repeat-find-next-character-x#2019-06-1005:51didibusSeems like to repeat f it is ;, and normally, going back is ,, but Evil rebinds that as major mode leader. So not sure if there is another one.#2019-06-1005:52zaneAre you on develop?#2019-06-1005:53didibusYa#2019-06-1005:53didibusDid a git pull like yesterday too#2019-06-1006:01zaneFigured it out.#2019-06-1006:01zanehttps://github.com/syl20bnr/spacemacs/tree/master/layers/%2Bvim/evil-snipe#2019-06-1006:01zaneI have that installed. š:skin-tone-2:#2019-06-1006:08didibusSweet!#2019-06-1006:08zaneHighly recommended.#2019-06-1006:09didibusNow I'm conflicted though. My biggest motivation for moving to Evil from Holy is that I learn something more widely applicable, like can also use it in Vi when ssh-ing and all. But I'm quickly realizing that Emacs majestic custumization can already drastically improve on Vi š#2019-06-1006:10zaneUnderstandable.#2019-06-1006:10didibusIt does look awesome though, love how s/S becomes a 2 char search.#2019-06-1006:10didibusthanks for the pointer#2019-06-1006:11zaneyw!#2019-06-1006:17didibusI was actually tempted to rebind s to be avy-goto-char-2#2019-06-1006:28ag> Emacs majestic custumization can already drastically improve on Vi
As I said many times: āEmacs vims betters than Vim can vimā#2019-06-1005:51didibushttps://stackoverflow.com/questions/10340562/vim-repeat-find-next-character-x#2019-06-1005:51didibusSeems like to repeat f it is ;, and normally, going back is ,, but Evil rebinds that as major mode leader. So not sure if there is another one.#2019-06-1005:53didibusevil-repeat-find-char-reverse is unbound it seems, so no default binding to go back on a f in evil#2019-06-1007:42didibusIn visual mode, once something is highlighted, how do I wrap it in brackets?#2019-06-1007:42didibusin Evil#2019-06-1008:58jahsonI think itās s( provided by https://github.com/emacs-evil/evil-surround#2019-06-1009:00jahsonsurround.vim has many other abilities, like ysiw"#2019-06-1009:00jahsonSeems like the evil mode has these too#2019-06-1009:02jahsonysiw" means surround inner word with "#2019-06-1010:02didibusThanks! You'd think Spacemacs would bundle all these already#2019-06-1010:03didibusNow I need evil-snipe, lispyville and evil-surround.#2019-06-1010:41jahsonSpacemacs ships with evil-surround, at least the develop branch#2019-06-1012:17aisamuI'm terrible with counting, so vwwwwwy it is.
But the fastest for me is just moving the cursor normally and using whole-line(`yy`) or to-the-end-of-the-line (`Y`).
Both respect sexps if you toogle some config.#2019-06-1012:58prncIām yet to find a combination of packages that respect Vim editing commands in the presence of parentheses š tried a bunch, there are some rough edges on all of them, may need to dive deeper⦠unless @ag you know you to fix those issues#2019-06-1213:57practicalli-johnnyI finally got around to using marks in buffers, really useful.
m a to create a mark called a, ' a to jump to that mark.
Marks can be used as a verb/modifier in Evil#2019-06-1213:59prncpretty useful stuff, I quite often will have some form that I eval repeatedly (inside comment form) marked with m e#2019-06-1213:59prncalso capital letters work cross buffer!#2019-06-1214:00prncvery useful when you have some reference piece(s) of code you keep coming back#2019-06-1214:13aisamuBTW is there a(n easy) way to invert that? Globals on lowercase, locals on Uppercase (which I rarely use)?#2019-06-1215:06prncmaybe, but seems like itās hard coded
(defun evil-global-marker-p (char)
"Whether CHAR denotes a global marker."
(or (and (>= char ?A) (<= char ?Z))
(assq char (default-value 'evil-markers-alist))))
#2019-06-1305:08didibusNothing is hard coded in Emacs š Just one redef away#2019-06-1215:06prncif thatās in fact the right place š#2019-06-1215:08prncthatās in evil-common.el BTW#2019-06-1215:09practicalli-johnnyI've created a PR for the Clojure layer to add the , e i keybinding for cider-interrupt, which kills a long running evaluation. For example you can use it to stop (range) evaluating before it eats all the stack š
https://github.com/syl20bnr/spacemacs/pull/12428#2019-06-1215:16prnc@jr0cket Cool! Isnāt this mapped to C-c C-c in the REPL buffer currently? I would probably say that something under , s namespace would be better for this, matter of taste ofc. Itās just where all the repl session related functionality lives curretnly--clear, connect, jack-in etc. feels like a natural home?#2019-06-1216:16practicalli-johnny@prnc no keybinding shows up in the Clojure major mode menu, so this is why I proposed the add. For those that do not use the REPL buffer directly, the C-c C-c keybinding is not relevant.
I added to the evaluation section because it is in regard of evaluating a specific (the current) expression. The command instructs the repl to stop evaluation, the other bindings under evaluation instruct the REPL to start evaluation. I don't want to stop or reset at the REPL level.
The functions under the cider repl seem to be a bit of a mixed purpose and level of abstraction. Additionally there doesn't seem to be room for a sensible keybinding under the cider repl section, , s, at least I could not think of one. Any ideas?#2019-06-1217:36prnc>I added to the evaluation section because it is in regard of evaluating a specific (the current) expression.
I think youāre right. That makes sense.
Re: the default bindings, not sure where that comes from but
C-c C-b runs the command cider-interrupt (found in cider-mode-map), which is an
interactive compiled Lisp function in `cider-client.el'.
`
is what I have for clojure-mode, weird...#2019-06-1217:38prncā¦so thatās from my function help for cider-interrupt#2019-06-1301:32practicalli-johnnyI'm not sure why the binding doesnt show in the documentation for the function.
Its always good to understand how people are using things in Spacemacs, especially the Clojure layer.
Thanks for the feedback.#2019-06-1305:03aisamuAnother user of C-c C-c chiming in.
Usually preceded by "Oh, crap!" and , s s, so I'd definitely appreciate more a direct binding!
describe-function for cider-interrupt here says:
It is bound to C-c C-c, C-c C-b, <menu-bar> <REPL> <Interrupt evaluation>,
<menu-bar> <REPL> <Test> <Interrupt running tests>.
#2019-06-1305:11didibusI just wish the Repl and major mode had the same binding for all.#2019-06-1222:45practicalli-johnny@ag SPC S s for flyspell-correct-at-point has now been cherry picked into develop from PR https://github.com/syl20bnr/spacemacs/pull/12430#2019-06-1223:00agawww⦠I completely forgot about it. I wish we also added something for flyspell-auto-correct-word. Turns out that thing is pretty cool#2019-06-1223:05agAlthough, you know what? Maybe that thing deserves itās own transient. So the way how it works e.g. in Org-mode. I think itās bound to M-C-i by default. You press the button, it attempts to auto-correct it and shows you list of alternatives - you keep pressing the key, it keeps cycling through them.#2019-06-1223:06agcool, right?#2019-06-1223:07agitās basically āI feel luckyā version of flyspell-correct-at-point#2019-06-1223:09agI think it would be nice if it worked in Spacemacs like SPC x i i#2019-06-1223:10agstring-inflections-transient#2019-06-1300:02agafter playing a bit with flyspell-auto-correct-word I came to a conclusion: it is pretty ādumbā and most of the time doesnāt even offer you a correction#2019-06-1300:03agcompared to it flyspell-correct-at-point works better#2019-06-1301:30practicalli-johnnyThere is a lot of features in the spell-checking I haven't really tried out. I only fix spellings as I go along. I'll have to explore it a bit more some day. Thanks for the feedback, very interesting.#2019-06-1302:02agyeah, I discovered flyspell-auto-correct-word word myself only yesterday and I liked it. Definitely has value, but I already build muscle memory for flyspell-correct-at-point which I bound to SPC xx. So whenever I make a typo I would do SPC xx RET, even without looking. Most of the time it turns out to be the correct suggestion. Thereās also flyspell-correct-previous, which I guess also can be handy, since most of the time you see the typo after you type a word and cursor is moved on.#2019-06-1302:06agsadly my proposal for SPC xx binding was rejected, but Iām a very sloppy typist. And as you know I type everything in Emacs. This binding has immense value for me. I also want to add flyspell-correct-previous to my workflow, maybe binding it to SPC x b and see if that sticks.#2019-06-1311:09practicalli-johnnyI haven't looked at the text menu much, SPC x, so nice things in there. I agree that SPC x x or SPC x s would be a nice keybinding and maybe I would be more inclined to use the +text menu š#2019-06-1311:10practicalli-johnnyPR's seem more likely to be merged if they have others comment on them, at least that's what it seems. So feel free to ping me any PR's you do (or post them in the #spacemac channel and I'll comment on them.#2019-06-1317:55agoh you might be interested in my little layer I have https://github.com/agzam/dot-spacemacs/tree/master/layers/ag-lang-tools#2019-06-1317:58agthesaurus, dictionaries, spell-checking are paramount features for me. English is hard and Iām not a native speaker, itās five times harder for me.#2019-06-1318:04agAnd for plain text editing thereās no other tool that could work for me better than Emacs. Thereās one thing is still missing from my workflow which I would love to have - Grammarly like syntax checker via flycheck. Grammarly sadly does not have API that can be used without using their app.
Iāve been looking for alternatives. One of them is Grammarbot (for which I intend to build an emacs-package, but I canāt find time to do it)
There are also projects like flycheck-vale that I may try when I have a chance.#2019-06-1305:03aisamuAnother user of C-c C-c chiming in.
Usually preceded by "Oh, crap!" and , s s, so I'd definitely appreciate more a direct binding!
describe-function for cider-interrupt here says:
It is bound to C-c C-c, C-c C-b, <menu-bar> <REPL> <Interrupt evaluation>,
<menu-bar> <REPL> <Test> <Interrupt running tests>.
#2019-06-1406:08didibusHas anyone got markdown code blocks or org code blocks working in a way that they each get properly highlighted, and indented based on their own major mode rules?#2019-06-1416:15zaneorg-mode appears to be doing both for me. Do you have a minimal example that's breaking for you?#2019-06-1609:22practicalli-johnnyNo problems with code blocks in either markdown or org-mode for me#2019-06-1605:34Drew Verleedoes spacemacs back up files periodically without any user input?#2019-06-1605:34Drew Verleetwice now it has full crashed and it seems like all my input was lost#2019-06-1605:37Drew Verleeok cool, M-x recover-file, last time it was only like 10 minutes worth of nonsense i lost... this time it was like 2 hours worth of nonsense!#2019-06-1605:44ag@drewverlee itās also worth exploring https://magit.vc/manual/magit/Wip-Modes.html. Enable (magit-wip-after-save-mode 1) it may save you hours of frustration one day.#2019-06-1710:40Andrea Imparatohello, anybody knows if there's a way in spacemacs to automatically refresh the browser when sending something to the clojure repl?#2019-06-1711:39practicalli-johnny@andrea.imparato if you are using Ring to drive your server-side web application, then you can use wrap-reload around your application and it will reload the browser when changes are saved.
For example
https://practicalli.github.io/clojure-webapps/middleware-in-ring/wrap-reload.html#2019-06-1711:39kirill.salykinor maybe you want something like figwheel#2019-06-1712:02practicalli-johnnyYes, figwheel if it's client side ClojureScript that you want to reload#2019-06-1711:39kirill.salykinhttps://figwheel.org/#2019-06-1717:03practicalli-johnnyAnyone using clj-kondo in Spacemacs yet for linting their clojure code? I plan to give it a try this week. Would like to see how it compares to joker#2019-06-1717:34lread@jr0cket I opted to enable both joker and clj-kondo so I first added these to my .spacemacs config like so:
dotspacemacs-additional-packages '(flycheck-clj-kondo flycheck-joker)
And then again in .spacemacs added the following under dotspacemacs/user-config
;; setup clojure linters
(use-package clojure-mode
:ensure t
:config
(require 'flycheck-joker)
(require 'flycheck-clj-kondo)
(dolist (checkers '((clj-kondo-clj . clojure-joker)
(clj-kondo-cljs . clojurescript-joker)
(clj-kondo-cljc . clojure-joker)))
(flycheck-add-next-checker (car checkers) (cons 'error (cdr checkers)))))
#2019-06-1718:37practicalli-johnnyThat's great, thank you. I will give this a try later tonight.
I wonder how easy this would be to add to the Clojure layer as a pull request...
Would be great to have them as options you can enable through variables (like is done with clj-refactor)#2019-06-1719:14lreadWould be awesome to have as an option in the clojure layer.#2019-06-1808:26jumarI've found this: https://github.com/borkdude/flycheck-clj-kondo/issues/2
=> You might need to modify the snippet a bit#2019-06-1809:39jumarBut anyway, thanks for pointing this out. I've just given the clj-kondo a second chance and it looks great!#2019-06-1809:39jumarthis may be helpful when contemplating about the joker vs. clj-kondo differences: https://speakerdeck.com/borkdude/clj-kondo-a-linter-for-clojure-code-that-sparks-joy-dcm-may-19#2019-06-1811:40lread@U06BE1L6T thanks for pointing out the git issue. My config is based on clj-kondo docs - seemed to work but have not tested extensively at all.#2019-06-1815:07lreadoh I see... docs are going to be updated so my snippet here will indeed change#2019-06-1815:26borkdudeAbout enabling both clj-kondo and joker, I think youāll need this:#2019-06-1815:26borkdudehttps://github.com/borkdude/flycheck-clj-kondo/issues/2#issuecomment-502857377#2019-06-1815:27borkdudeit seems flycheck is very sensitive to the order of linters in flycheck-checkers, so youāll need to put the first linter that going to kick off the chain on the front#2019-06-1815:28borkdudeIāll update flycheck-clj-kondoās README with that snippet later this week#2019-06-1818:17lread@borkdude thanks! Is clj-kondo-edn available yet? Iām getting an error that it is not a valid syntax checker#2019-06-1820:02borkdude@lee not yet, first Iāll have to release a new clj-kondo version, after that Iāll push a new version of flycheck-clj-kondo#2019-06-1820:03lreadok, thanks @borkdude!#2019-06-1915:51borkdudethis should work: https://github.com/borkdude/clj-kondo/blob/master/doc/editor-integration.md#spacemacs
(except for the edn linter, which will be added in the next version). thanks @rahul080327#2019-06-1916:29practicalli-johnnyI've created an issue to consider adding Joker and clj-kondo to the Spacemacs Clojure layer, along with Eastwood which is already there. Then make the linters optional to the Clojure layer, so people have choice in which ones they use (and because there is an external install for Jocker and clj-kondo)
https://github.com/syl20bnr/spacemacs/issues/12453#2019-06-2611:23practicalli-johnnyI finally got around to learning how to record an use keyboard macros in Spacemacs, specifically using Evil. Its really simple, q and a name to record, @ and a name to use.
I'll add this to the book soon... https://github.com/practicalli/spacemacs-gitbook/issues/11
Anyone use a different approach with keyboard macros in Spacemacs?#2019-06-2611:48Chris OāDonnellYou can also do @ @ to execute the previous macro again; I do that pretty often.#2019-06-2612:00practicalli-johnnyThanks, that is really useful. I was wondering if such a thing was possible, as using . to repeat the macro didnt work#2019-06-2612:52jeff.terrellAnd don't forget prefixing @@ with a number. I often have a macro that processes a line in some way. Then I'll either calculate how many lines remain and do them all in one go or else do a page full at a time (`/cdn-cgi/l/email-protection@`).#2019-06-2613:15lispycloudsrelative line numbers save from calculating the lines too! š and can do it in smaller, precise blocks#2019-06-2612:52jeff.terrellThis is exactly how macros in vim work, by the way, so this is another thing that evil-mode is faithful about.#2019-06-2612:53jeff.terrellHowever, I have noticed that macros are more robust and reliable in vim than emacs. I can't remember what I was doing, but a couple of times I've noticed that something that would work as a macro in vim doesn't work in emacs. It may have had to do with switching buffers. (Sometimes I had a macro in vim that would process a file in some way then switch to the next one.)#2019-06-2612:55jeff.terrellOne more fun note: you can create macros without q. All q does is record keystrokes into a register. If you typed out your keystrokes, including escaping control characters (`C-v` in vim, C-q in emacs), you can just yank the text to a register with e.g. "ay$ then execute it as a macro with @a. I do this sometimes to debug a long macro that wasn't quite right. Paste from the register, tweak the command string, then yank back to that register.#2019-06-2612:56practicalli-johnnythis is great, thanks. I will definitely be using keyboard macros more now.#2019-06-2620:10agoh, macros can be totally mind blowing, did you know that you can also edit them? So you like record a macro, then run M-x edit-last-kbd-macro#2019-06-2712:34jeff.terrellOh, now that's cool. You get a heads-up view of which functions were invoked at each key press. Nice!#2019-07-0616:42eggsyntaxDamn, whatever you were responding to has dropped off the end of history. Can I ask what it was? Sounds intriguing š#2019-06-2712:35jeff.terrellThis also might explain why I had difficulties with macros before when moving between files/buffers. Whereas Vim records keystrokes, Emacs (maybe?) records function invocations. If the files aren't all in the same mode, a function call that works in one buffer might not work in another.#2019-06-2812:44Andrea Imparatohello, quick question, is there a function to override for running something after the layers have run?#2019-06-2812:51Andrea Imparatonvm, i've solved my issue š#2019-07-0204:09eccentric JDoes this finite-state-machine diagram accurately model a spacemacs-like menu? Iām working on a program that has a similar mnemonic menu while also learning state machines. Figured this would be the best place to ask š
#2019-07-0204:14aglooks right I think, but itās hard to tell without Submenu. So in what state the Previous (main menu) would be when Sebmenu activates?#2019-07-0204:17agSpacehammer currently keeps the main modal active even when you are in a sub-modal, which is not right. e.g. when you press Cmd+SPC then m - it opens Multimedia modal, but Main modal keys are still active, you still can press w and jump to Windows modal - this isnāt right#2019-07-0204:18agIāve been thinking about rewriting it, but Iāve been pretty swamped on my full-time job#2019-07-0204:50eccentric Jhttps://github.com/eccentric-j/spacehammer/blob/develop/modals2.fnl it is crudely solved in my solution. I create a new hs.hotkey.modal every time a menu is activated. Upon activating a new modal, it clears bindings before setting new ones by deleting the hotkey modal. It seems to work pretty well, even got the repeatable: true flag in the top config working so things like volume can be repeated. In terms of an FSM I think it would be about responding slightly differently when transitioning to active while already active#2019-07-0205:03eccentric JIt stores a list of active paths in the state atom#2019-07-0205:04eccentric JSo like [:w :m] would look up the menus for window bound to :w, then the submenu move bound to :m#2019-07-0205:09eccentric JItās kind of a good thing you did not get a chance to write it. A coworker wants to use a FSM to solve a problem at work and up until the past two days, I didnāt know much about them. I would not be able to help design it or even review it. This project is a great opportunity for me to learn how to implement one on my own given your pretty solid framework š#2019-07-0215:52eccentric JOof I am interested in using this package with spacemacs https://github.com/emacsmirror/fennel-mode but Iām not sure how to add it. I donāt think itās on MELPA which means I have to clone it somewhere?#2019-07-0216:01agFennel-mode is on MELPA#2019-07-0216:09eccentric JOh! Sorry about that, I was looking at the readme instructions. Iāll just wrap it in a spacemacs layer then. Thanks!#2019-07-0216:24eccentric JHah wow wrapping it in a layer was ridiculously easy.#2019-07-0216:42agyou may wanna do something like this:
(use-package fennel-mode
:init
(autoload 'clojure-align "clojure-mode" nil t)
:config
(spacemacs/set-leader-keys-for-major-mode
'fennel-mode
"fl"
'clojure-align))
#2019-07-0217:45eccentric JThanks, Iāll try that out#2019-07-0220:13eggsyntaxHey folks! Anyone know a good way to hard-wrap an HTML document in SM? fill-region results in ugly (but presumably valid) line breaks, eg between a and href. Any option that's a bit more sensitive to the HTML-ness of the buffer?#2019-07-0220:28agI think web-mode should handle HTML properly on M-q#2019-07-0220:28agitās been ages since the last time I used it, but I think that what it does#2019-07-0220:29agyup http://web-mode.org confirms that#2019-07-0220:33eggsyntaxHmm, still doesn't do very well for me. eg doing M-q on a single (very long line) leaves me with (excerpt)
<p>If you've moved or changed your name, please update your voter registration.
We can help you get started at <a
href="https://{{recipient.hostname}}/">{{recipient.hostname}}</a>. Once that's
done, you should <a
Again, presumably valid, but pretty unpleasant for the reader.
That said, this is using the hbs wrapper around handlebars, so it may not be recognized as a valid template file. Does say it's in web-mode, though.
As a sanity check (since I'm evil-mode), I've got M-q bound to fill-paragraph. I assume it's the same for you?#2019-07-0220:34agyeah, M-q is Emacsās native#2019-07-0220:34eggsyntaxOh, no, that web-mode page does have hbs listed, so it's not that.
Oh well! "Pretty" as well as valid may be asking too much š#2019-07-0220:34eggsyntaxThanks ag, I appreciate it!#2019-07-0221:28ag> may be asking too much
when it comes to Emacs, it is never too much. You just need to know/find what to tweak and where#2019-07-0313:03eggsyntaxHeh, true that š#2019-07-0322:50zaneFor those of you who are on Macs, which Homebrew build of Emacs works best with Spacemacs in your experience? If I recall correctly there are several: emacs emacs-plus emacs-mac
⢠https://github.com/Homebrew/homebrew-core/blob/master/Formula/emacs.rb
⢠https://github.com/d12frosted/homebrew-emacs-plus
⢠https://github.com/railwaycat/homebrew-emacsmacport#2019-07-0401:06aisamuI'm on /cdn-cgi/l/email-protection, because 26 scrolling was terribly slow here#2019-07-0402:46lreadHey @U050CT4HR, Iām currently on emacs-macport because I wanted to easily try out the Fira Code font. https://github.com/syl20bnr/spacemacs/issues/6972#issuecomment-365945351#2019-07-0401:06aisamuI'm on /cdn-cgi/l/email-protection, because 26 scrolling was terribly slow here#2019-07-0400:11eccentric JAnyone know off-hand how to make spacemacs perform evil yank\deletes against a register other than the system clipboard by default? I prefer the default vim behavior so I can have something in the clipboard without worrying about it getting replaced.#2019-07-0403:30eccentric J(local initial-state {:state :idle
:menu nil
:page active})
#2019-07-0403:30eccentric JFor some reason spacemacs thinks thatās the correct indentation#2019-07-0404:28eccentric JGoing to take this to emacs. Iām betting this is more of a general emacs thing.#2019-07-0412:04practicalli-johnnyI am not experiencing any issue with indenting in Spacemacs develop#2019-07-0413:34eggsyntaxI hit something like this every once in a while. Infrequently enough that I just hand-correct it and move on. But if you find a solution, I'd love to hear about it!#2019-07-0413:50eccentric JThanks, after investigating it seems to be an issue specific to fennel-mode which is another lisp language. My solution for now is to just use Clojure mode since theyāre pretty similar.#2019-07-0414:01eccentric JOne more question: Whatās the best way to run clojure-mode with .fnl files?#2019-07-0414:03practicalli-johnnydont know if this is best, but apparently (add-to-list 'auto-mode-alist '("\\.fnl" . clojure-mode)) should work, if you put in your .spacemacs file...#2019-07-0414:05eccentric JThanks!#2019-07-0421:54eccentric JEnded up finding the cause. https://github.com/syl20bnr/spacemacs/commit/488fc0977f0e88aefab28cfe6ba30966fc4fcdbe updates the editorconfig. I had
[*]
indent_size=2
Which was causing fennel-mode and emacs-lisp-mode to mess up indentation.#2019-07-0515:25eggsyntaxHas anyone else found that fancy symbols have started to result in incorrect indentation in the files? I would swear that behaved properly for me for years, until sometime in the last few months.
In my editor:#2019-07-0515:25eggsyntaxIn the file (viewed with vim):#2019-07-0515:26eggsyntaxHistorically, as far as I know, the file was always correct, and spacemacs just compensated it in the view. But that's no longer true š#2019-07-0515:33eggsyntaxMore to the point: does anyone know away to use fancy symbols in clojure-mode without screwing up the indentation in the file?#2019-07-0517:32lread@eggsyntax, I am currently enjoying Fira Code https://github.com/tonsky/FiraCode#2019-07-0517:47eggsyntaxI think I decided against that at one point because it wasn't clear that it'd work with spacemacs, but you've got that combo working? It was a while ago for me, so the situation may have improved.#2019-07-0518:04spfeifferI am using that font, too. But i am not sure that relates to the indentation problem?!#2019-07-0519:07eggsyntaxI haven't tried it, but I think it might? Because it uses ligatures, they're (at least potentially) multi-space characters.
I'm basing the above on the "Caveats" section of http://www.modernemacs.com/post/prettify-mode/#2019-07-0521:00lreadyeah @eggsyntax it seems to be working fine. I installed and configured emacs-mac following these instructions https://github.com/syl20bnr/spacemacs/issues/6972#issuecomment-365945351#2019-07-0521:18eggsyntaxCool, thanks!#2019-07-0521:24eggsyntaxAnd then just as a clarifying question -- in the Clojure examples on the Fira Code page, I'm only seeing changes to non-word chars (equals variants, arrows, etc). Does it also include changes to word chars, eg fn to Ī»? It seems like it wouldn't, since you wouldn't want eg Hefner to become HeĪ»er.#2019-07-0521:59lreadI do not see lambda symbol in my code. So your guess seems right. If you have some time you might enjoy watching tonskyās video from Clojure North https://www.youtube.com/watch?v=l1b7Da2DnPo It covers Fira Code.#2019-07-0607:58spfeiffer@eggsyntax No, fn -> \lamba is done by pretty-symbols and has nothing to do with FiraCode. With Firacode, you get nicer ligatures on symbols like ->>#2019-07-0518:52practicalli-johnny@eggsyntax I just enabled fancy symbols and when I rebooted it was initially showing mis-aligned indentation with a lambda function. However, after editing the code, the agressive indent seems to correct it.
I have this enabled in .spacemacs
(add-hook 'clojure-mode-hook #'aggressive-indent-mode)#2019-07-0518:53practicalli-johnnyOr it could also be either of these correcting it
https://github.com/clojure-emacs/clojure-mode#indentation-of-function-forms
(setq clojure-indent-style 'align-arguments)
Vertically align s-expressions
https://github.com/clojure-emacs/clojure-mode#vertical-alignment
(setq clojure-align-forms-automatically t)#2019-07-0519:08eggsyntaxAwesome, thanks @jr0cket! I'll try those out.#2019-07-0519:35eggsyntaxFollow-up -- no luck with any of those. I haven't updated in a while, though, it's possible I need to. @jr0cket I assume you're on develop?#2019-07-0520:20practicalli-johnnyJust updated to latest develop today#2019-07-0616:39pabloreI getting this sayid error when doing cider-jack-in today
Error loading com.billpiel.sayid.nrepl-middleware: Syntax error compiling at (com/billpiel/sayid/util/other.clj:284:3).
Exception in thread "main" Syntax error compiling var at (/private/var/folders/q9/7v8dcy694bj2mc9cykfm8gn00000gn/T/form-init14833350831488686507.clj:1:10311).
#2019-07-0617:18practicalli-johnnyIf you are not using Sayid for debugging your entire project, then I suggest removing it as it is known to cause issues. Cider has its own debugger for instrumenting specific functions.#2019-07-0617:21practicalli-johnnyIf you are using Sayid and are using the develop branch of Spacemacs, then Sayid is now disabled by default, so if you upgraded Spacemacs recently then you could try enable Sayid again
https://practicalli.github.io/spacemacs/install-spacemacs/enhance-clojure-experience.html#2019-07-0616:40pabloreCaused by: java.lang.RuntimeException: Unable to resolve var: com.billpiel.sayid.nrepl-middleware/wrap-sayid in this context
at clojure.lang.Util.runtimeException(Util.java:221)
at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:720)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7106)
... 35 more
Subprocess failed
#2019-07-0616:45eggsyntaxSmells to me like a dependency version conflict. Are you adding a Sayid dependency in your project or your personal profile? IIRC a Sayid dependency is included as part of CIDER now.
Thatās a guess, though. Otherwise Iād run through the standard set of steps --
- move your ~/.lein/profiles.clj out of the way if youāre using lein.
- try it on a fresh project
- update spacemacs & libraries#2019-07-1211:15practicalli-johnnyI have proposed two new PR's for Clojure layer keybindings in Spacemacs. Please add a positive reaction or comment on each GitHub PR if you are okay with them being added (it makes it more likely they will get merged into develop). Thank you.
https://github.com/syl20bnr/spacemacs/pull/12520#2019-07-1211:16practicalli-johnnyhttps://github.com/syl20bnr/spacemacs/pull/12523#2019-07-1212:45practicalli-johnnyThings are (allegedly) better in threes, so here is a third PR for the Clojure layer in Spacemacs. This time making a keybinding for the improved find definion wrapper added several months earlier.
https://github.com/syl20bnr/spacemacs/pull/12525#2019-07-1215:33aisamuThank you (and John Stevenson)!!#2019-07-1215:38Mario C.I have dotspacemacs-line-numbers nil but they line numbers are still showing up. If I go into a buffer and toggle the line numbers on then I get two columns of line numbers. Turning it off makes it go back to one column. How can I fix this/#2019-07-1216:01practicalli-johnny@mario.cordova.862 Switching off line numbers needs a restart Emacs for line number changes to take effect. Just doing SPC f e R is not enough.#2019-07-1216:01practicalli-johnnyIf you have restarted Emacs, my guess is you have line numbers set somewhere else.#2019-07-1216:02practicalli-johnnyI am running the latest develop branch (just updated a few hours ago) and switching line numbers off worked after a restart of Emacs.#2019-07-1216:02practicalli-johnnyIf you are on Spacemacs master branch, their could be a bug, but I do not know, sorry.#2019-07-1216:13Mario C.It works in master but develop is where the issue is happening. I did a restart and same thing. I guess Ill just go back to master#2019-07-1216:21Mario C.I noticed that in /layers/+spacemacs/spacemacs-defaults/packages.el in the (defun spacemacs-defaults/init-display-line-nubers () ..) function I see this (cond ((spacemacs/visual-line-numbers-p)
(setq display-line-numbers-type 'visual))
((spacemacs/relative-line-numbers-p)
(setq display-line-numbers-type 'relative))
(setq display-line-numbers-type t)))
#2019-07-1217:08practicalli-johnnyIf I read the elisp correctly, that is just setting the kind of line numbers. As you are setting it to nil in your .spacemacs file, then none of those conditions would be matched#2019-07-1216:21Mario C.@jr0cket#2019-07-1216:21Mario C.Perhaps this is forcing the value into true?#2019-07-1216:21Mario C.nvm that is setting the type#2019-07-1217:04practicalli-johnnydo the line number toggle functions work?#2019-07-1217:04practicalli-johnnySPC t n#2019-07-1217:05practicalli-johnnySPC t r#2019-07-1217:05practicalli-johnnyshould switch line numbers off/on straight away#2019-07-1217:11practicalli-johnny@mario.cordova.862 if its not a stray setting in .spacemacs or .spacemacs.d, it could be in a package you added (but now I am grasping at answers)#2019-07-1218:07zaneDo any of y'all have vim-style-visual-feedback (also known as evil-goggles) working?#2019-07-1218:07zaneI'm doing (setq-default dotspacemacs-editing-style '(vim :variables vim-style-visual-feedback t)), but it doesn't appear to be having the desired effect. I'm on develop.#2019-07-1218:21zaneAh. https://github.com/edkolev/evil-goggles/issues/25#2019-07-1317:07practicalli-johnnyAll three pull requests I asked for feedback from have all been accepted and merged into develop branch. Thanks to everyone for your feedback.#2019-07-1317:08practicalli-johnnyIf there any other aspects of the Clojure layer you think could be improved, feel free to discuss.#2019-07-1404:21aisamuPerhaps bindings for the -up-to-point evaluation variants?#2019-07-1409:09practicalli-johnnyI believe one has just recently been added , e v, I was not aware of these, I will investigate. Any you particularly use?#2019-07-1503:30aisamuThere are only two, sexp and defun. They're useful to evaluate "incomplete" expressions, such as the first half of threading macro without having to comment all the remaining lines. I usually pick sexp (`C-c C-v C-o` is the default binding)#2019-07-2407:52practicalli-johnnyhappy to add these bindings. what do you suggest? SPC m e p p for sexp (as its defalt) and SPC m e p f for defun?#2019-07-1317:09practicalli-johnnyI would like to understand what parts of the Clojure layer are most used, or possibly more importantly what do you not use or think should be changed.#2019-07-1317:12practicalli-johnnyI am especially curious about the keybindings under SPC m s - the repl part of the menu for the Clojure layer. There are quite a few 'send-to-repl' functions under that menu, do people actually use these?#2019-07-1317:19kirill.salykinI do#2019-07-1317:19kirill.salykinI miss a lot ability to send to level form inside comment exp#2019-07-1318:51practicalli-johnnyI typically comment individual lines with #_ comment reader macro.#2019-07-1318:54practicalli-johnnyWith the (comment ,,, ) function, you can use the inline evaluation functions
, e e - I use this on the next line after the expression I want to evaluate
, e v on the opening paren of an expression#2019-07-1317:20kirill.salykinTop* level#2019-07-1318:38practicalli-johnnyWould you be willing to elaborate on your workflow?#2019-07-1318:44practicalli-johnnyIs it something like this:
1) jack-in
2) , s s to open the repl buffer
3) write / navigate to code in source code buffer
4) , s f or , s e to evaluate code in the REPL buffer?#2019-07-1405:56lispyclouds@U05254DQM I think what @U1V7K1YTZ is meaning to say is if I'm inside an sexp like (+ 1<here> 2) and want to evaluate the form to 3 I shouldn't have to go to the opening brace which , e v needs. Correct me if I'm wrong @U1V7K1YTZ as this is something I sorely need too š#2019-07-1405:57lispycloudsOn a side note, do you have an idea how to do this @U05254DQM? š#2019-07-1406:51kirill.salykinYes, this is correct. Thanks for explaining#2019-07-1408:13lispycloudscider-pprint-eval-defun-at-point kinda works for this case, but if im in a nested sexp like (def a (range 0<here> 5)) and I wanna see (0 1 2 3 4) as output, it evals the whole def form#2019-07-1409:14practicalli-johnny, e v is in develop now for cider-pprint-eval-defun-at-point but as you say its not quite what you are wanting all the time. Its not something I do, perhaps #cider channel has some suggestions#2019-07-1318:43jahson(comment
;; It's often convenient to send to repl instead of switching to it
;; so you can have all your research stuff in one place - the data, the flow
(def data {:some :data})
(call-some-fn-on data)
...
;; etc
)
#2019-07-1318:45practicalli-johnny@jahson So you prefer to send evaluation to the separate REPL buffer, rather than seeing the evaluation results inline in the source code buffer#2019-07-1318:47jahsonI think I got a part of this habit from vim's fireplace.#2019-07-1318:48practicalli-johnnyVery interesting, thanks for sharing. I think my preference for showing the evaluation results inline comes from LightTable#2019-07-1319:00jahsonI think I must elaborate on this.
I've been used to opening the repl and writing code inside of the repl at the start.
After that I've started to learn fireplacethings, like cqp to open a prompt and eval, or cpp to eval the innermost form. Eventually I've started working without repl being visible, only reaching it for cases when I've needed to work on some big structure that doesn't fit into vim's message area.
Around that time I've got te gist of (comment), that it helps with not relying on repl history, that the data is more visible, and that the repetition is easier.
Nowadays I often work without open repl, but I've seen many other people relying on repl being open.#2019-07-1319:01jahson> Nowadays I often work without open repl, but I've seen many other people relying on repl being open.
That means that I've prefer inline evaluation atm š#2019-07-1319:06practicalli-johnnyGood to know, thanks. Do you ever use the #_ comment reader macro instead of (comment ). For example:
#_
(handy-funciton-helper arg)
#2019-07-1319:09practicalli-johnnyOr comment out parts of an expression that is essentially a pipleline, like a threading macro
(->> book
(re-seq #"[a-zA-Z0-9|']+" ,,,)
(map #(clojure.string/lower-case %))
#_(remove common-english-words)
#_frequencies
#_(sort-by val)
#_reverse)
#2019-07-1319:26jahsonFor me the comment reader macro is like a comment. I think it should't get into vcs, like the other commented out code. OTOH the (comment) for me is like a playground that can be reused later. And it might get to vcs.#2019-07-1320:55practicalli-johnnyI use the #_ exactly as a playground and place that playground code at the bottom of the file, usually with a description of each expression and why its there.#2019-07-1321:54jahsonI should probably try this.#2019-07-1319:11jahsonI don't use this reader macro often, but I've seen people using it. I learned about this macro after about two years into clojure, so I'm not very used to it.#2019-07-1319:12jahsonTo comment thing out I use comments š#2019-07-1319:13jahsonLike gcaf inside the form I need to comment.#2019-07-1319:15practicalli-johnnyI believe you can just use gcc if I understand you correctly#2019-07-1319:16jahsonNo, the gcc comments the line iirc.#2019-07-1319:17jahsonThe gcaf is a "phrase" = g c(omment) a(round) f(orm)#2019-07-1319:17jahsonI don't recall what is the g for.#2019-07-1319:18practicalli-johnnyAh, yes, I wasnt using gacf on a nested function š I see what you mean now. Thats nice, I didnt know that (no vim background for me)#2019-07-1319:18jahsonAnd it will conveniently move the parentheses to the next line.#2019-07-1319:18practicalli-johnnyvery nice š I will add that to my book...#2019-07-1319:19jahsonJust tried in vim: it's not so convenient and comments out everything, including the parentheses that shouldn't be commented.#2019-07-1319:26jahsonJust refreshed my memory: https://github.com/tpope/vim-commentary
gc is the command, and the af is the motion.#2019-07-1319:29practicalli-johnnyThanks. If you have any other vim-like things you find valuable in Spacemacs I would really like to hear about them. What I have learnt so far is on https://practicalli.github.io/spacemacs/editing/vim-style/speaking-evil.html and the following few pages.#2019-07-1319:31jahsonSure. If I remember anything useful, I'll post it here. By the way thank you for your book, it helped me a couple of times.#2019-07-1321:57jahsonI also often use the daf, dsf, caf, cif. The af and if text objects seems to be from https://github.com/luxbock/evil-cleverparens/blob/master/evil-cleverparens-text-objects.el#2019-07-1321:58jahsonI think there should be some kind of keypress tracker.#2019-07-1321:59jahsonAh, it's called keyfreq.#2019-07-1321:59jahsonGotta try it http://blog.binchen.org/posts/how-to-be-extremely-efficient-in-emacs.html#2019-07-1404:21aisamuPerhaps bindings for the -up-to-point evaluation variants?#2019-07-1508:24kirill.salykinhow do you guys go one symbol left-right in mini-buffer when renaming file?
ctrl-h goes one level in directory tree
only arrows?
(renaming file with space f R)#2019-07-1508:43aisamuOnly arrows here, would love alternatives that aren't emacsy#2019-07-1516:44agC-b C-f C-a C-e#2019-07-1516:45kirill.salykinright, thanks!#2019-07-1516:56agI realized that if you donāt learn at least basic vanilla Emacs movement keys youād get really badly stuck when something breaks in your config#2019-07-1516:56agthereās no better editor for emacs-lisp#2019-07-1508:45romainHas anyone encountered this error while installing emacs-plus HEAD
>gzip: can't stat: ../etc/publicsuffix.txt (../etc/publicsuffix.txt): No such file or directory
>make: * [install-arch-indep] Error 1#2019-07-1715:02Mario C.Is there a specific directory spacemacs uses to find fonts?#2019-07-1715:02Mario C.Where do I install new fonts?#2019-07-1715:13kirill.salykini think it is system dependent#2019-07-1715:15kirill.salykini mean you install fonts into system, not into spacemacs#2019-07-1715:20Mario C.Yea but I notice online people were installing it /usr/share/fonts#2019-07-1715:20Mario C.But my mistake was in the settings#2019-07-1715:20Mario C.~/Library/fonts is the default on osx and it works#2019-07-1811:50lreadI wonder how hard it would be to update cider docs to also include spacemacs keystrokes.#2019-07-1812:01lreadI donāt think any cider authors are spacemacs users(?)#2019-07-1813:44practicalli-johnny@lee this is why I created https://practicalli.github.io/spacemacs/#2019-07-1813:45practicalli-johnnyThe docs in the Clojure layer for Spacemacs give you a good overview of the keybindings, however, its more like a cheetsheet. I would be happy to work on some pull requests to improve the Clojure layer docs if you think its helpful.#2019-07-1813:45lreadYour work is wonderful and I refer to it often!#2019-07-1813:45practicalli-johnnyOne day it will be finished š#2019-07-1813:46practicalli-johnnyI can discuss getting some Spacemacs specific stuff added to the CIDER docs. Or maybe just a reference to Spacemacs specific documentation from http://docs.cider.mx#2019-07-1813:48lreadI was more thinking that while reading through cider docs, having those spacemacs cider commands right there would be so cool. Keeping it up to date would also be a good way to ensure that our clojure layer is not missing any cider goodness. But all this would take time and ongoing interest.#2019-07-1813:50lreadJust thinking out loud, I suppose the cider docs could have a toggle for emacs and spacemacs and the appropriate keystrokes would show.#2019-07-1814:08practicalli-johnnyI did think about having a toggle on the Practicalli Spacemacs book, between Evil an Holy modes. This did feel better than my first attempt at putting them both together. It felt very heavy going. Instead I just focused on the Evil style.#2019-07-1814:09practicalli-johnnyI will have a chat at some point with the CIDER team and see what they think. Or fee free to ask in the #cider channel. They are a friendly bunch in there, especially when you are willing to help make CIDER better.#2019-07-1816:12lreadThanks @jr0cket, Iām going to wait a bit until I can commit to helping.#2019-07-1818:33eggsyntaxJust did a round of upgrades of spacemacs (to latest on develop as of a week or so ago) and packages. The biggest upgrade issue I've encountered is that when I jack-in or connect a repl, it now starts in user rather than the namespace marked as :main in the project.clj file.
Anyone else encountered this? If so, have you found a solution?#2019-07-1819:13practicalli-johnny@eggsyntax I think someone mentioned that their repl was only starting in user namespace in either the #cider or possibly #emacs channel#2019-07-1819:15practicalli-johnnyIt seems you should use :init-ns to define the namespace and not rely on :main - assuming this is a Leiningen project#2019-07-1819:16practicalli-johnny#2019-07-1819:17practicalli-johnny@eggsyntax maybe they just fixed the feature that used main incorrectly š#2019-07-1819:17eggsyntaxYeah, that seems very plausible. Many thanks!#2019-07-1819:22practicalli-johnnyI just updated my develop branch and everything is working very smoothly. I would be interested to here if you have any issues, especially around Clojure. There are also some more Clojure mode keybindings now š#2019-07-1820:26eggsyntaxWhen you say "working very smoothly," do you mean you're seeing the old behavior again (starting the CIDER REPL in the :main ns if :init-ns isn't there)? I'm definitely not seeing that. Oddly, {:repl-options {:init-ns foo.core}} doesn't seem to change behavior either.
My main suggestion so far re the keybindings -- it's nice to have the jack-in options organized, but I'd suggest keeping , s i bound to cider-jack-in-clj, as the most common case, while also having it bound to your new binding of , s j c.#2019-07-2219:42practicalli-johnnyInteresting, I assumed that , ' would be the most common way to cider-jack-in. Do you not use this keybinding?#2019-07-2312:36eggsyntaxI don't. Part of that is probably just habit, and part is that it's an awkward sequence in dvorak (left ring finger off home row, then left pinky off home row).
That said, I had forgotten its existence when I made the suggestion. I retract the suggestion, if there is already a top-level shortcut and now a third-level shortcut, no need for a second level shortcut :-)#2019-07-2312:39eggsyntax(if you're responding, I'd love to hear an answer to the question before the key findings suggestion, that would be useful info!)#2019-07-2406:39practicalli-johnnyI assume you are asking about setting the namespace. I don't usually do that, but it is nice to know how. I will test and see what works and let you know#2019-07-2406:55practicalli-johnnyI created https://github.com/jr0cket/defaulting-the-namespace and when I run with cider-jack-in then it sets the namespace to that defined in :main#2019-07-2406:56practicalli-johnnyThis was with Leiningen version 2.8.3. I will check with the latest version to see if it still works.#2019-07-2406:59practicalli-johnnyIt still works with Leiningen 2.9.1#2019-07-2407:01practicalli-johnnyI updated the packages recently and am on CIDER 0.22.0snapshot (package: 20190708.1036)#2019-07-2407:01practicalli-johnnyThe cider-jack-in command is
[nREPL] Starting server via /home/jr0cket/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :plugins conj \[refactor-nrepl\ \"2.5.0-SNAPSHOT\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.22.0-beta8\"\] -- repl :headless :host localhost...#2019-07-2407:11practicalli-johnnyIf can also successfully add a new namespace and set that to be the default using ;repl-options {:init-ns }.
I just pushed that to the above git repository#2019-07-2513:17eggsyntaxOh, interesting. Thanks @jr0cket, that's really helpful!#2019-07-1819:22eggsyntaxCool, I'll give it a shot!#2019-07-1906:11didibusI have an issue where when I do , e e to run cider-eval-last-sexp, when I'm in normal mode, with the cursor on the last param, it doesn't run that sexp, but instead the last form inside it. It is because it seems cider wants the cursor to be one more to the right, except normal mode doesn't allow you to put the cursor there.#2019-07-1906:11didibusAny solution to this?#2019-07-1906:33agwhat about , e v? afaik itās only available in develop though#2019-07-1907:06didibusI'll pull latest develop and try#2019-07-1907:18practicalli-johnny@didibus Use , e e on the next line down from your expression, this is the simplest possible approach
(press j first and 0 if the next line contains code and you are not at the start of the line)
Or you can use , e f to evaluate from the top level of the current sexp / form from anywhere inside the sexp#2019-07-1907:23practicalli-johnnyYou can also use , e ; anywhere in an expression to evaluate from the top level of the current sexp/form and give the answer as a comment rather that a temporary display.#2019-07-1907:29didibusOh, I see, its a bit annoying, would be nice if cider used the sexp under point#2019-07-1907:30didibusEspcially since in emacs-lisp mode, , e e with cursor over the ending parens evaluates the sexp#2019-07-1907:30didibusas well as on the line after#2019-07-1907:31didibusI wonder what makes it not work in Clojure, is it clojure-mode, spacemacs or cider ?#2019-07-1908:49jumarI think I configured spacemacs to allow to move beyond the last character because of this...
@didibus It should be the evil-move-beyond-eol var#2019-07-1909:02practicalli-johnny@didibus seems odd to me if in eLisp major mode that , e e would evaluate the current expression when its the last and the previous expression in all other cases. How would you ever evaluate the last but one expression without adding a space?#2019-07-1909:05practicalli-johnnyThe function is evaluating the last expression and not the current one, otherwise the function should be renamed#2019-07-2021:27didibusYou would just move the cursor over the end of the previous one#2019-07-2021:28didibusAnd by the way, I'd much prefer the function was evaluating the form under the cursor, but alas, in elisp it doesn't work like that either#2019-07-2111:55kirill.salykin, e f#2019-07-2111:56kirill.salykinEvaluates form under cursor#2019-07-2111:56kirill.salykinTop form, to be precise #2019-07-2111:57kirill.salykinOh, it is elisp#2019-07-2111:57kirill.salykinMy bad, sorry #2019-07-2215:32scknkkrerIs Clojure/Clojurescript Go to Declaration works ?#2019-07-2215:47lispycloudsYes, it needs to be connected to a REPL and current buffer to be evaluated.#2019-07-2217:48practicalli-johnny@scknkkrer cider-find-var is the command I assume you are asking about. As has been mentioned, it only works with the REPL running (and you may need to evaluate your own function definitions before it finds them)#2019-07-2217:50practicalli-johnnyYou can also use dumb-jump-go which does not need the REPL. As the name suggests, it simply looks for matches in the project, so may give a wider set of matches#2019-07-2217:51practicalli-johnnysuggestions for navigating Clojure code: https://practicalli.github.io/spacemacs/navigating-code/#2019-07-2316:57romainI'm curious to know if some of you tried doom-emacs and went back to spacemacs. If so why did you make this choice?#2019-07-2320:11practicalli-johnnyI tried doom-emacs for a few days with a friend at work who wanted to try it. Doom-emacs didn't offer me anything I wasn't getting from Spacemacs already for the last few years.
I was a little concerned about doom-emacs just being the work of one person.
I don't think there is anything wrong with doom-emacs, but as I also contribute the occasional PR to Spacemacs I would need a compelling reason to leave.#2019-07-2406:12romain@jr0cket I love your blog post and all the efforts you put in spacemacs clojure layer ^^'
I can understand why it's not worth it to switch.#2019-07-2406:19practicalli-johnnyYes, there is that too š#2019-07-2406:24practicalli-johnnyI get the sense that doom-emacs tries to be even more vim like. I am not from a vim background so probably not aware of things that make doom-emacs appealing.
Spacemacs helped me appreciate the vim style editing and I am very grateful for that.
I wish doom-emacs every success.#2019-07-2408:09romainI really appreciate the simplicity and philosophy of doom, plus Henrik is really active and emacs rocker. But I really like all the work done in spacemacs (especially bindings/hydra) and its "big" community#2019-07-2410:43prncHi! Has anyone anyone had any trouble with magit lately? after package update, magit window starts in emacs emacs state and even when switched to vim state mappings donāt work. Package update rollback helps š (temporarly), Cheers!#2019-07-2415:49eccentric JIf I want to eval a clojure expression in the repl buffer and pprint the results, is there a simple way to do that?#2019-07-2415:50eggsyntaxNot that I know of.#2019-07-2415:51eccentric JOk, so say you want to check the output of a function that returns a good sized data structure. How would you go about evaluating it and examining its results?#2019-07-2415:59eggsyntaxWell, personally I use datawalk for that š
https://github.com/eggsyntax/datawalk
And lately I've been loving scope-capture for cases where I'll frequently need the inputs/output of a function.
But otherwise I would typically send it to the REPL, and then do (pprint *1) (or (pp)).#2019-07-2416:00eggsyntaxOh look, actually there is a pprint version of eval!
cider-pprint-last-sexp and a few variants. I knew you could eval & print, but I didn't realize you could pprint.#2019-07-2416:01eggsyntaxWith evil bindings:#2019-07-2416:02eggsyntax#2019-07-2416:06eccentric JThanks. When I try cider-pprint-eval-last-sexp I see āwrong type argument: stringp, package-descā#2019-07-2416:07eggsyntaxOh, that's annoying. Have you evaluated the ns containing the sexp in question?#2019-07-2416:08eggsyntaxJust confirmed that it works for me.#2019-07-2416:08eccentric JYes, I can evaluate it using most the other evaluation options. I think this has something to do with refactor https://github.com/clojure-emacs/clj-refactor.el/issues/369#2019-07-2416:20eggsyntaxVarious clj-refactor functions have definitely failed for me a lot of times, it's mentioned somewhere in docs that some of them just don't work.
But does that fn come from clj-refactor? I wouldn't have expected it to.#2019-07-2416:20eccentric JI donāt think it does, but clj-refactor seems to be messing with that function a bit.#2019-07-2416:21eccentric JDisabling refactor and restarting it fixed that immediate issue, it now opens a buffer with the result but not really pprint format#2019-07-2416:21eccentric Jhttps://cl.ly/e1f6b50f2c28#2019-07-2416:21eggsyntaxOh, nice! Ish.#2019-07-2416:22eggsyntaxMy motivation for writing datawalk was definitely that pprint isn't really adequate for large data structures.#2019-07-2416:22eccentric JYeah, itās progress!#2019-07-2416:24eccentric JAdmittedly this is probably 15 lines of code for this data structure Iām trying to view. Itās too much for me to scan it inline, but not that big where I need another plugin (plus my emacs fu is weak right now)#2019-07-2416:29eggsyntaxAnd of course these days there's REBL. But IIRC I got my lein + REBL instructions from you, so I know you're aware of that one š#2019-07-2416:30eccentric JHaha of course š However, Iām in ClojureScript which I donāt think REBL supports yet.#2019-07-2416:57eggsyntaxAh, yeah, totally. Well, datawalk does š#2019-07-2416:58eggsyntaxI'll stop pushing my library on you now š#2019-07-2417:00eccentric JHaha Iāll try it. I have no idea why itās not actually pprintāing the results.#2019-07-2509:22jumarI often use cider-inspect and sometimes cider-inspect-last-result#2019-07-2515:37eccentric JThanks, Iāll try that!#2019-07-2515:52Mario C.Is there way I can assign a shortcut to open up a specific file in a new buffer?#2019-07-2515:53Mario C.I was thinking something like SPC b o <letter-or-string-assigned-to-specific-file>#2019-07-2516:06Mario C.Nvm I figured out how to do this#2019-08-0510:48practicalli-johnnyThere are additional cider-connect commands and the relatively recent sesman (session management) commands available in Cider, however, these do not have Spacemacs Evil keybindings in the Clojure layer.
What keybindings would make sense to you?
I have raise an issue on the Spacemacs GitHub repository to capture discussion around these keybindings. Please share your thoughts
https://github.com/syl20bnr/spacemacs/issues/12593#2019-08-0517:25Drew VerleeWhat styleing does spacemacs come with out of the box for clojure? Is it bbatsovs?#2019-08-0609:48practicalli-johnny@drewverlee as in code style? Spacemacs just uses the standard CIDER formatting style as far as I understand. You can add aggressive indent and vertical alignment of forms if you like things that way
https://practicalli.github.io/spacemacs/improving-code/formatting/#2019-08-0612:50bostonaholicthe clojure layer uses https://github.com/weavejester/cljfmt#2019-08-0707:29borkdudeI'm not using spacemacs. Maybe anyone can help here? https://github.com/borkdude/clj-kondo/issues/403#2019-08-0707:29borkdudeI'll also refer him to this channel#2019-08-0707:32borkdudethe docs: https://github.com/borkdude/clj-kondo/blob/master/doc/editor-integration.md#spacemacs#2019-08-0707:33lispycloudsI'm trying to help there#2019-08-0707:34borkdudemaybe he's having a PATH issue.#2019-08-0707:37lispycloudspossibly. Also the error may show up in *Messages*#2019-08-0707:38lispycloudsif the spacemacs config is correct though#2019-08-0708:21borkdudeI think he's having a snap issue. I'm considering removing the package from snap, because this confuses people all the time: it's only possible to read/write to files in the home directory#2019-08-0709:14AndrosHi! I see that the problem is discussed š#2019-08-0709:15AndrosI give more information: I have done a clean installation, I have left it .spacemacs clean and I've uninstalled the snap version.#2019-08-0709:16Androswhere clj-kondo#2019-08-0709:16Andros/usr/local/bin/clj-kondo#2019-08-0709:17borkdude@andros
Can you post the output of flycheck-compile (select clj-kondo-clj as the linter) from a Clojure buffer?#2019-08-0709:22Andros!!!!#2019-08-0709:22AndrosNot showing in my list#2019-08-0709:22Andros:face_with_raised_eyebrow:#2019-08-0709:22Androsclj-kondo-clj#2019-08-0709:25borkdudethen you probably have not required flycheck-clj-kondo yet#2019-08-0709:26borkdude(I'm not aware of how spacemacs does this by default, I just use https://github.com/borkdude/flycheck-clj-kondo directly)#2019-08-0709:32Androssorry, a stupid commented. I have just run flycheck-compile (select clj-kondo-clj as the linter)#2019-08-0709:33Andros#2019-08-0709:35Androsworking... still no underlines errors in code#2019-08-0709:44borkdudeok, so flycheck is working, clj-kondo is working. what could be not working?#2019-08-0709:47Androsš#2019-08-0711:00practicalli-johnny@andros the only thing I can see is you have some custom faces definitions at the end of your .spacemacs. I would be surprise if they are the cause, but cant see any other issues...#2019-08-0711:00practicalli-johnnyI assume you restarted Spacemacs after you added the config for clj-kondo to .spacemacs#2019-08-0711:40AndrosI found the solution#2019-08-0711:40Androsadd (add-hook 'clojure-mode-hook #'flycheck-mode)#2019-08-0711:41AndrosMy configuration#2019-08-0711:42Andros(add-hook 'clojure-mode-hook #'flycheck-mode)
(use-package clojure-mode
:ensure t
:config
(require 'flycheck-clj-kondo))
#2019-08-0711:42AndrosI tell you, I found the same problem in OSX, and in both cases it works the same way.#2019-08-0711:43AndrosThank you all for your help @jr0cket @borkdude @rahul080327!! š#2019-08-0711:49practicalli-johnnyThanks for sharing your solution#2019-08-0712:01borkdude@andros glad you solved, so are the spacemacs docs for clj-Kondo missing something?#2019-08-0712:53lispycloudsThanks for the solution, this seems to work with without the (add-hook 'clojure-mode-hook #'flycheck-mode) for me at least. Wonder what could be the issue?#2019-08-0712:54lispyclouds@jr0cket do you have to do the add-hook as well?#2019-08-0713:15lispycloudsafaik this should've been done by the syntax-checking and clojure layers automatically?#2019-08-0713:36practicalli-johnnyYou shouldn't need the add-hook for this. I do not need it. I will try this out on a separate laptop and see if I can replicate the issue.#2019-08-0713:39lispycloudsyes thats my understanding too#2019-08-0720:44borkdudeok, I won't merge this PR until someone here can confirm it's needed (cc @andros)
https://github.com/borkdude/clj-kondo/pull/404#2019-08-0815:33lreadFWIW, I donāt need this. And @andros, donāt know if this applies to you but my flycheck in spacemacs was misbehaving a few days ago, I am on the spacemacs develop branch and pulling latest and updating all packages fixed my issues.#2019-08-0910:44Andros@UE21H2HHD No No! I'm in the master branch. I don't know what to say anymore, the same thing happened to me in two different systems and with a clean installation. š If I find out the cause, I'll let you know. š#2019-08-0811:42Abhinav SharmaGuys, I need you help regarding a snippet. What I'd like to do is to fold all the occurences of (comment ... ) in the file. I'm not so good at elisp so could you please help me out? I know that the z r works on the entire file and unfolds however the opposite would be nice as well.#2019-08-0813:51practicalli-johnny@abhi18av my elisp is not that great sorry. Hopefully someone else can suggest something.
Are you not able to put all your commented out code in a single (comment ,,, ) block at the end of your namespace, then you can just use z c to fold the comment function call. This is a fairly common 'design journal' style approach.
I use the comment reader macro myself, #_, rather than the comment function, as it returns no value. Its very useful as a temporary comment within the code#2019-08-0817:03Abhinav Sharma@jr0cket, actually as of now I'm taking the following route
(def all-defs-info-final
(map info-for-a-def all-defs-in-src))
(comment
(first all-defs-info-final)
(take 10 all-defs-info-final))
This lets me keep the experimental code along with the main code itself, though it does make the file really dense. And yes #_, is something I've also become very fond of š#2019-08-1516:50Abhinav Sharma@jr0cket, so I actually found a solution to his š
(defun qyh/clojure-close-comments (arg)
"Close all top level (comment) forms. With universal arg, open all."
(interactive "P")
(save-excursion
(goto-char (point-min))
(while (search-forward-regexp "^(comment\\>" nil 'noerror)
(call-interactively
(if arg 'evil-open-fold
'evil-close-fold)))))
(evil-define-key 'normal clojure-mode-map
"zC" 'qyh/clojure-close-comments
"zO" (lambda () (interactive) (qyh/clojure-close-comments 'open)))
This was graciously shared with me on the spacemacs issues discussion. Hope it helps people here as well.#2019-08-1516:50Abhinav Sharma@jr0cket, so I actually found a solution to his š
(defun qyh/clojure-close-comments (arg)
"Close all top level (comment) forms. With universal arg, open all."
(interactive "P")
(save-excursion
(goto-char (point-min))
(while (search-forward-regexp "^(comment\\>" nil 'noerror)
(call-interactively
(if arg 'evil-open-fold
'evil-close-fold)))))
(evil-define-key 'normal clojure-mode-map
"zC" 'qyh/clojure-close-comments
"zO" (lambda () (interactive) (qyh/clojure-close-comments 'open)))
This was graciously shared with me on the spacemacs issues discussion. Hope it helps people here as well.#2019-08-1410:21doesntmeananythingHey, everyone! I've recently switched to Spacemacs and I have a problem with enabling linters for clojure files. I see that this is a bit of a hot topic here š
My issue is that I can't for some reason enable default linting from the clojure layer. I followed the simple steps here: http://develop.spacemacs.org/layers/+lang/clojure/README.html#linting
I also added all the relevant dependencies to project.clj. In the end, however, I don't get any linting and flycheck shows this: https://i.imgur.com/XoIpBT5.png
I'm wondering if anyone had similar issues?#2019-08-1412:16practicalli-johnny@andrey.krasnov.pm The lint configuration in the Clojure Layer docs is for Eastwood/Squiggly. I haven't used that combination (as it can have side effects of your code is not reloadable.
I use clj-kondo as a linter and that works well for my needs
https://practicalli.github.io/spacemacs/improving-code/linting/clj-kondo.html#2019-08-1423:16dijonkitchenI've had similar issues with the default not working, but clj-kondo has been working. Not sure what's wrong with the default instructions though.#2019-08-1504:03borkdude@andrey.krasnov.pm
There was someone who had to do an an extra thing for clj-kondo:
https://github.com/borkdude/clj-kondo/pull/404/files
Not sure if that's also your problem?#2019-08-1507:47doesntmeananythingClj-kondo works fine for me with the instructions from @U05254DQM. Installation was really smooth with no issues!#2019-08-1507:56borkdudeThanks!#2019-08-1507:35practicalli-johnnyWould be interested to know if anyone actually uses Eastwood/squiggly as a linter. If no one uses it we could deprecate it in the docs / layer (especially if itās broken)#2019-08-1507:59doesntmeananythingI would support that. The default instructions are really inconsistent and just refuse to work on either master branch or develop. Plus making sure that your code has no side effects is a pretty big warning to consider for something as innocuous as in-editor linting.
On the other hand, clj-kondo is very simple to install and seems to cover most uses. It's really a great tool.
While Eastwood is fantastic, I think for most non-trivial cases it's better to offload using it onto some customised CI job as an extra linting precaution#2019-08-1508:37practicalli-johnnyI agree about Eastwood, it seems more appropriate as a batch processing linter for the whole project, either before you push a commit to a shared repo or as mentioned part of the CI pipeline. Thanks for the feedback.#2019-08-1508:48jumarWhen you use imenu (e.g. helm-jump-in-buffer) does it show functions args too?
For me it does not but I think I've seen elsewhere that signatures/args could/should be visible.#2019-08-1516:41agThat I believe is possible, but youāre gonna need to modify https://github.com/clojure-emacs/clojure-mode/blob/master/clojure-mode.el#L711#2019-08-1509:48murtaza52hi I just reinstalled emacs brew cask install emacs. I have my lein in my local bin. In my .zshenv, I am adding lein to the path. I have a spacemacs installation and it was working well before the reinstall.
Now when I do cider-jack-in it is says lein is not in the path, any remedies ?#2019-08-1510:09murtaza52got it working -
(setenv "PATH" (concat (getenv "PATH") ":/Users/murtaza52/bin/"))
(setq exec-path (append exec-path '("/Users/murtaza52/bin/")))
#2019-08-1511:02jumarYou don't have lein bin in /usr/local/bin/lein? (that is the standard location for the homebrew package)#2019-08-1512:15murtaza52I had installed it directly using the script, brew install lein didnt work for me#2019-08-1604:47murtaza52brew install leiningen worked, thanks#2019-08-1805:48murtaza52What is usually used to search for a string in project files ? I usually use projectile-helm-ag, however I see that it doesnt have a shortcut, so maybe there is more frequently used command ?#2019-08-2111:15mitchIs anyone else having issues with arrow key file navigation? Just did a fresh install and I canāt navigate to files with the arrow keys.#2019-08-2112:07practicalli-johnnyTime to learn the Evil way of Vim, they you will never need to use those arrow keys again...#2019-08-2112:08practicalli-johnnySeriously though, are you navigating in dired, helm, ivy or treemacs?#2019-08-2112:22mitchHelm!#2019-08-2117:16zaneRelated question: When navigating pop-ups like auto-complete I know I can press C-j to move down the list of options. The trouble begins for me when I realize I went too far and press C-k to move back up the list. C-k in insert mode appears to run evil-insert-digraph through which I've managed to lock up my spacemacs multiple times. Is this a problem other people have encountered? Did you just rebind C-k when in the auto-complete minor state? (Is there such a thing?)#2019-08-2117:21agwhy navigate in a pop-up at all? press C-/ and do it in helm#2019-08-2118:20zaneI wasn't aware of C-/. That said, given how often I use auto-complete an extra keystroke to open helm every time is not an insignificant burden.#2019-08-2118:23agI use company a lot and the issue youāre talking about bothered me too. So I did this:
(with-eval-after-load 'company
(define-key company-active-map (kbd "C-n") 'company-select-next)
(define-key company-active-map (kbd "C-p") 'company-select-previous)
(define-key company-active-map (kbd "C-f") 'company-search-candidates))
but most of the time I just do C-/ - better search and etc.#2019-08-2118:48zaneRight on. Thanks for teaching me about C-/ and for the snippet! I'm definitely going to add that to my .spacemacs. ā¤ļø#2019-08-2216:21Yehonathan SharvitI would like to be able to run cider command while in lisp state like when I am in normal state with , leader key e.g. ,ee to evaluate expression etcā¦
How do I achieve this?#2019-08-2216:29ag@viebel check evil-lisp-state-commands#2019-08-2216:30Yehonathan Sharvit@ag I tried it but as far as I know, I have to add a line for each keybinding. I am looking for a way to add a binding for ,#2019-08-2216:33agIām not sure what exactly you are trying to achieve, hereās for example how I extended lisp state by adding a command to reindent current sexp:
(with-eval-after-load 'evil-lisp-state
(defun sp-reindent ()
(interactive)
(save-excursion
(er/expand-region 2)
(evil-indent (region-beginning) (region-end))))
(evil-lisp-state-enter-command sp-reindent)
(spacemacs/set-leader-keys "k=" #'evil-lisp-state-sp-reindent))
so pressing SPC k = would re-indent things.#2019-08-2216:35agdo you want to eval sexp and stay in lisp state? Whatās exactly are you trying to do?#2019-08-2217:15Yehonathan Sharvit@ag I am trying to make all cider functions accessible from lisp state with the same keybindings as in normal state#2019-08-2217:58agI get that, but whatās the workflow? How are you getting into the lisp-state to begin with? Anyway, it should be as straightforward as doing something like this:
(add-to-list 'evil-lisp-state-commands '("e e" . cider-eval-last-sexp))
#2019-08-2218:01agah, that wonāt work because e is bound to sp-splice-sexp-killing-forward#2019-08-2218:02agI guess it aināt so straightforward as I thought#2019-08-2219:55Yehonathan SharvitMy workflow is:
1. Normal state
2. Switch to Insert state
3. Edit some code
4. Switch to lisp state
5. Now I want to evaluate an expression without having to press ESC#2019-08-2219:56Yehonathan SharvitAs I said, I can make it work by rebinding all the cider keys: ee, ef, eb etcā¦#2019-08-2219:56Yehonathan SharvitBut I think there should be a way to make the ā,ā key available in lisp state and trigger the cider functions#2019-08-2219:56Yehonathan SharvitDoes it make sense?#2019-08-2220:19practicalli-johnny@viebel it's not exactly what you are asking, but you can use M-RET as the major mode leader instead of , when in Lisp State.#2019-08-2220:21practicalli-johnnyI consider lisp state to be just like insert state. So if I want to evaluate code then I drop back to Normal state using ESC or fd.#2019-08-2220:25practicalli-johnnyI assume you would need to either modify lisp state elisp or add hooks in your .spacemacs file (or become used to eval code in normal state)#2019-08-2220:30Yehonathan Sharvit@jr0cket M-RET is great#2019-08-2220:30Yehonathan SharvitIs it possible to make , work like M-RET while in lisp state?#2019-08-2220:31agOk. You confused me because lisp state is something else. Not what you mean#2019-08-2220:34agLisp state is when you press "SPC k" ... In normal mode#2019-08-2220:35Yehonathan SharvitI know @ag#2019-08-2222:43practicalli-johnny@viebel M-RET is the Emacs binding for the major mode menu so its always available in any evil state as well as Emacs (holy mode).
I dont know how you would edit evil-lisp-state to have a major-mode menu bound to the key ,. Evil-lisp state is a micro state in Spacemacs so its not configured to have a leader key for a major mode. Even if you did find a way to add , to call the major mode menu within the evil-lisp-state If someone added a , keybinding to the evil-lisp state then I dont know which would take precedence.#2019-08-2223:01practicalli-johnnyI don't really understand you workflow. Why are you switching from insert to lisp state? Are you always structurally editing after adding new code?#2019-08-2223:07practicalli-johnnyMy use of multi-modal states is:
In normal to evaluate code, navigate around code, maybe code fold, spell check, etc
From normal to insert to add code and back to normal (using fd) to demarcate the undo boundary of text changes
From normal to lisp to refactor using slurp, barf, raise, transpose, etc and back to normal#2019-08-2309:52Yehonathan Sharvit@jr0cket. I have two use cases for running cider command without leaving the lisp state:
1. When navigating a namespace stucturally I want to be able to go quickly to definition of vars with ,gg
2. When editing a namespace, I want evaluate several expressions subsequently in lisp state. Currently I have to do: H in lisp state, switch to normal state, ,ee, switch to lisp, H, switch to normal, ,ee#2019-08-2311:09practicalli-johnny@viebel I can't help you I'm afriad, I just dont know how to change lisp state to do what you want.
I enjoy using normal state for evaluation, insert state for writing code and lisp state for a little bit of structural editing, although I can do most of the structural editing in Evil normal mode as I use evil safe structural editing
https://practicalli.github.io/spacemacs/install-spacemacs/evil-structural-editing.html
I never stay in lisp state as I find it easier to navigate parens and expressions in normal mode.
H evil-cp-backward-sexp
L evil-cp-forward-sexp
M-l evil-cp-end-of-defun
M-h evil-cp-beginning-of-defun
M-l evil-cp-end-of-defun
I also use , e f to evaluate the top level of the current form (expression), that way I do not need to jump to the end / next line after the expression to use , e e.#2019-08-2312:01Yehonathan SharvitYou make me ask myself @jr0cket: why do I need the lisp state at all? I could add all the bindings I need for structural navigation to normal mode#2019-08-2312:24practicalli-johnnyLisp-state is a transient state and is very useful as such for wrapping all of the smartparens commands in a consistent way for use with all languages. I use lisp-state occasionally when writing documents for example. As such I find it very valuable.
Your comments suggest you want one mode for everything, which will cause tension if you use Spacemacs with the evil mode as it is based around multi-modal editing.
If you do just want one state, you can switch to holy mode for a more relevant experience#2019-08-2314:23Yehonathan Sharvitevil-clever-parens is exactly what I was looking for https://github.com/luxbock/evil-cleverparens
Thanks @jr0cket for sharing a link to it in https://practicalli.github.io/spacemacs/install-spacemacs/evil-structural-editing.html#2019-08-2314:23Yehonathan SharvitI donāt need the lisp state any more while coding in Clojure.#2019-08-2314:23Yehonathan SharvitI am a happy person#2019-08-2314:30kirill.salykindo you know about lispyville?#2019-08-2314:30kirill.salykinhttps://github.com/noctuid/lispyville#2019-08-2417:18Yehonathan SharvitNot sure what is the real added value over clever-parens#2019-08-2417:21kirill.salykinClever parents seems not maintained for a while, also I recall some issues with clever-parens (but might be fixed already)#2019-08-2813:21Yehonathan SharvitI see. But I got used to it. Not sure I want to unlearn key bindings#2019-08-2410:52mitchTo Update from my question regarding helm all of a sudden not having arrow key support, all you have to do is add (customize-set-variable 'helm-ff-lynx-style-map t) to your user-config!#2019-08-2412:13spfeifferWhen flycheck mode is not activated in clojure mode even if i added the syntax-checking layer, where can i have a look? Manually activating works fine, but all resources say the this should work automatically?#2019-08-2412:14spfeifferAnd could you remind me what was the rationale for the decision that spacemacs captures the env variables, including PATH? Now i need to remember another place where i need to update a path to make tools available?#2019-08-2413:16StefanHi, Iām new to Emacs but I thought Iād give it a try. Iām considering Doom and Spacemacs, trying the latter at the moment. One important aspect for me is being able to use the parinfer smart mode. If I understand things correctly, I should be able to add parinfer to the list dotspacemacs-configuration-layers in my .spacemacs. However that results in a warning when launching spacemacs: āUnknown layer parinfer declared in dotfile.ā. How do I solve this?#2019-08-2414:22spfeiffer@stefan.van.den.oord You need to be on the develop branch to make parinfer work.#2019-08-2414:22spfeifferMost likely that is your problem.#2019-08-2418:19StefanIndeed it was, thank you!#2019-08-2506:57spfeifferUnfortunately, master branch is really extremely behind develop. But as develop feels really stable, the general advice is to switch to develop. I heard there are activities to bring master up to speed, but that is a big task and may take some time.#2019-08-2508:11Stefanouch that bad? š#2019-08-2508:12StefanI did have it recreate my .spacemacs, it was missing some config directives, but after that it worked fine.#2019-08-2512:17spfeifferYes, that bad. āSwitch to developā is the general advice nowadays for many spacemacs problemsā¦#2019-08-2514:30StefanNo worries, I was just teasing, didnāt mean anything negative with it. I now how these things go. In fact I think in the past I have had a project where I renamed āmasterā to āold-masterā and ādevelopā to āmasterā š#2019-08-2417:21murtaza52in a clojrue project when a new file is created, there is a setting which inserts a default ns into the file based on the file name and dir depth. does anyone know how to enable it ?#2019-08-2417:50spfeiffer@murtaza52 I never heard of that, sounds interesting.#2019-08-2417:53murtaza52@spfeiffer I reinstalled spacemacs, and have lost that setting. going through the old .spacemacs file but cant figure out which setting that was (the old file got corrupted).#2019-08-2421:21practicalli-johnny@murtaza52 I think adding the namespace is done if you have clj-refactor enabled (I haven't checked this in a while though)
(clojure :variables
clojure-enable-clj-refactor t)
This is my Spacemacs setup Nd ms and renaming of files with - in the name both work#2019-08-2615:26Drew VerleeIs anyone successful able to ignore files when using a projectile project search? googling has given me answers that i feel i tried in the past and never worked.#2019-08-2621:10practicalli-johnny@drewverlee Projectile should ignore your .gitignore patterns by default
I can ignore files when searching with ripgrep using the -g! option followed by the filename pattern. So to find my-function but not in markdown files I can use
-g!*.md my-function
To search only in .clj files, then just use -g without the !#2019-08-2708:07jumar@U05254DQM do you happen to know if there's a way to actually include files listed in .gitignore ?#2019-08-2708:30practicalli-johnnyIf I read the docs correctly, then you should be able to create a .projectile file in the same directory as your .gitignore and starting each line of the pattern with a !
!/src/foo
!*.yml
I guess just copying your .gitignore file to .projectile and adding ! to the start of each line would be quickest way.
https://projectile.readthedocs.io/en/latest/projects/#ignoring-files#2019-08-2708:34practicalli-johnnyLet me know if that works or you find a better way š#2019-08-2709:09jumarSeems to work but I realized I'm actually more interested in including those files when doing fulltext search (`helm-project-do-ag` et al.)#2019-08-2621:11practicalli-johnnyI think silver searcher should also work, but not all search tools may work, or have different options#2019-08-2621:54Drew VerleeThanks, I'll give that a try#2019-08-2700:56zaneHas anyone else noticed a change in how Spacemacs handles exec-path? It used to somehow pick up the value in the PATH environment variable and use that as the exec-path, but it doesn't appear to be doing that now. I'm on MacOS, if that's relevant.#2019-08-2700:58zaneInterestingly, when I C-h v exec-path it shows:
exec-path is a variable defined in āC source codeā.
Its value is
ā¦
Original value was
ā¦
and the "Original" value matches my PATH, which is what I want. I guess that means it's getting overwritten somehow? :thinking_face:#2019-08-2701:00zaneI found this, but (shell-command-to-string "env") shows the right thing. https://github.com/syl20bnr/spacemacs/issues/10906#2019-08-3020:35bostonaholicIām on dev branch of spacemacs and it seems that paredit-forward-barf-sexp and paredit-forward-slurp-sexp havenāt been working lately. Get the error Wrong type argument commandp, ...#2019-08-3020:36bostonaholicI update the packages weekly, trying again now.#2019-08-3020:41bostonaholicnope, still broken#2019-08-3117:48practicalli-johnnyI updated 5 days ago (packages, template and commits) and I just tried those commands, they both worked on my Clojure code.
I use smartparens so wouldn't have noticed if something broke the paredit package although I don't think the paredit package itself has changed in a long time.#2019-08-3117:49practicalli-johnnyIt could be a rogue parens that got into your code. Have you tried it with a new project?#2019-08-3119:03bostonaholicit works after I connect to a cider repl. It used to work just fine without cider. I wonder if something changed in ciderā¦#2019-09-0216:40practicalli-johnnysmartparens is not tied to any particular language and it works without CIDER running. Its been years since I used paredit, so dont know how much its tied to the way CIDER works. There have been a lot of changes in CIDER over the last year.#2019-08-3121:14lreadlooks like clj-kondo support is being merged into the develop branch https://github.com/syl20bnr/spacemacs/commit/b71c78655f105739c1062452fe5c60bbcaf5ea0c#diff-f44e0dbaf4d2e36b9bb1419e9cde4cfd#2019-09-0107:32practicalli-johnny@lee great news, thanks for letting us all know about clj-kondo being added as an option to the Clojure layer in Spacemacs#2019-09-0107:33practicalli-johnnyTo enable it, pull down the latest develop branch and add this to your .spacemacs configuration in dotspacemacs/layers
(clojure :variables
clojure-enable-linters 'clj-kondo)
#2019-09-0107:35practicalli-johnnyOf course you need to install the clj-kondo binary to a path that Spacemacs is aware of https://github.com/borkdude/clj-kondo/blob/master/doc/install.md#2019-09-0109:32practicalli-johnnyI just created a pull request to update the Clojure layer documentation for linters. Comments on GitHub most welcome.
https://github.com/syl20bnr/spacemacs/pull/12685#2019-09-0120:23spfeifferUpdated, did the config changes, works great. Now for me flycheck modd is also active now in clojure mode⦠š#2019-09-0214:47Drew VerleeI'm trying to just read the spacemacs documentation and the famous line by Morpheus seems relevent:
"Unfortunately, no one can be told what the ~Matrix~ Emacs is. You have to see it for yourself."#2019-09-0217:28practicalli-johnny@drewverlee Emacs is the matrix....
Are you reading http://develop.spacemacs.org/doc/DOCUMENTATION.html ?#2019-09-0218:21Drew VerleeYes. It's well written, but i need to practice some of the functionality towards a specific goal if i want to really learn it. I got search and replace to work for me after some trouble shooting. The issue was that search replace via projectile-replace gets interrupted by other errors (file not found, issues with packages trying to read the file, etc..) Maybe that only happens if you open the file (replace with confirm).#2019-09-0223:02practicalli-johnnyThat is a good point. I am trying to give context to how to use aspects of Spacemacs in the book and videos, still a fair bit to add though š
https://practicalli.github.io/spacemacs/#2019-09-0223:10Drew VerleeI appreciate the effort!!!#2019-09-0417:50Drew Verleeif i enter paredit mode i can't get an invalid structure. is there another way to do that?#2019-09-0418:20practicalli-johnny@drewverlee Copy paste is the best way to get an invalid structure. Was an invalid structure what you wanted ?#2019-09-0418:23practicalli-johnnyIf you toggle of safe structural editing off, then you can also create an invalid structure in Evil style editing (although I have only tried that with smartparens in strict mode#2019-09-0418:23Drew VerleeI wasn't clear. I'm saying, I'm using lisp state, but when I exit that I can still mess up the structure. What's the best way to disallow that globally.#2019-09-0418:24practicalli-johnnyhttps://practicalli.github.io/spacemacs/install-spacemacs/evil-structural-editing.html
Have safe structural editing switched on#2019-09-0418:24Drew VerleeActually, evil cleaver parens should help with that. Maybe I didn't have it on.#2019-09-0418:25agdotspacemacs-smartparens-strict-mode#2019-09-0418:25practicalli-johnny, T s#2019-09-0418:25agM-x check-parens helps too#2019-09-0418:26Drew VerleeOk, thanks I'm looking at the right tools. I must not have enabled it correctly.#2019-09-0418:26practicalli-johnnyThis is how I set up smart parens in .spacemacs
https://practicalli.github.io/spacemacs/install-spacemacs/smartparens.html#2019-09-0418:26agsometimes you need to enter unbalanced paren intentionally, then you can do in Spacemacs in insert mode C-v and then insert a paren. In vanilla Emacs thatās bound to C-q#2019-09-0513:40martinklepschHow do I tell clojure-mode to indent things like p/alet like let? I found some examples in the README but am not sure about the specific incantation Iām looking for#2019-09-0515:48bostonaholic@martinklepsch
(with-eval-after-load 'clojure-mode
(define-clojure-indent
(compojure.core/context 1)
(context 1))
#2019-09-0515:48bostonaholicI put that in dotspacemacs/user-config in my .spacemacs file#2019-09-0515:51lispyclouds@martinklepsch this is how i do it, in a bit different way: https://github.com/lispyclouds/configs/blob/master/.spacemacs#L389-L398#2019-09-0515:51lispycloudsworks without the fully qualified ns#2019-09-0515:52martinklepschinteresting, is the 1 the part that tells clojure-mode to indent the thing like a let?#2019-09-0515:52lispycloudsyep#2019-09-0515:56martinklepschnice, that did it. Thanks! @rahul080327 @bostonaholic! š#2019-09-0515:57bostonaholic1 tells it to āindent 1 timeā#2019-09-0516:03martinklepschMakes sense, I guess I was expecting it to be more complex due to the binding vec#2019-09-0716:05AleixHi! I'm a beginner on this world of clojure. I started using spacemacs with cider.
I hope this is a good place to ask ^^
I don't fully follow how to run the tests. On a new cider session, it run the whole test space, but when I update the test (and save) and re-run the test, seems like the cider keeps referring to the previous test asserts.
Am I missing something?#2019-09-0716:08Aleixadding an image in case it helps#2019-09-0914:23aisamuHow are you running the tests?#2019-09-0914:25AleixCtrl+c ctrl+t p#2019-09-0914:46aisamuWhat does that map to? (cider-run-focused-test or all-tests or loaded-tests )#2019-09-0915:08Aleixcider-test-run-project-tests#2019-09-0915:20AleixI have tried others and happens the same :+#2019-09-0915:37AleixS**t, I had to reevaluate the file#2019-09-0717:23scknkkrerGuys, Iāve updated my packages from the main-screen of spacemacs.
And [SPACE] f f - find files or url behavior is changed!
left and right keys doesnāt act like the before.#2019-09-0723:35mitchAll you have to do is add (customize-set-variable 'helm-ff-lynx-style-map t) to your user-config!#2019-09-0717:24scknkkrerHow can I fix it ?#2019-09-0805:54spfeifferAnd how did it behave now?#2019-09-1121:44scknkkrerSame, wrong. #2019-09-1305:04spfeifferNo idea what āwrong" means. What does the keys do instead?#2019-09-0918:24Aleixis there a way that, on save, cider re-evaluate the whole file?#2019-09-0919:03flefikyou can use an after save hook?#2019-09-0919:03flefik(add-hook 'after-save-hook 'foo)#2019-09-0919:04flefikand defun foo to call cider-eval-buffer (conditional on file type etc.)#2019-09-0919:04AleixGonna try, super new to this world, thanks for the tips ^^#2019-09-0919:05flefikā¤ļø#2019-09-0919:06flefiki normally donāt save the file and just evaluate the buffer#2019-09-0919:08flefikthen it just asks you y/n if you want to save it before evaluating#2019-09-0919:08AleixWhich shortcut is to evaluate the whole buffer instead of placing the cursor at the end? Can't find.
Using ctrl+x ctrl+e currantly#2019-09-0919:08flefikif you press M-x#2019-09-0919:08flefikyou can start typing a command#2019-09-0919:08flefikyou want cider-eval-buffer#2019-09-0919:08flefikyouāll notice how the shortcut is listed there too#2019-09-0919:09flefik#2019-09-0919:09flefik(I use the vim bindings so itāll be something different in holy mode)#2019-09-0919:11flefikM-x means meta-x itās usually Alt-x#2019-09-0919:11flefik(Ctrl-x is abbreviated C-x etc.)#2019-09-0919:13AleixThanks @UAEFFG05B ^^ much appreciated#2019-09-0919:14flefikhave you seen practicallis spacemacs guide?#2019-09-0919:14flefikhttps://practicalli.github.io/spacemacs/#2019-09-0919:45Aleixstarted with it, but lost the other tutorials#2019-09-1101:39jimiThis is not clj related, but does anyone know how to turn off indentation on SQL layer?#2019-09-1101:44jimiNvm I got it#2019-09-1102:57bostonaholic@electricladyland156 has it been acting odd for you, too?#2019-09-1123:08jimiI don't know if it's odd, but the auto-indent is always annoying for me. I fixed it by declaring the layer deps like this (sql :variables sql-auto-indent nil)#2019-09-1200:55bostonaholicitās odd for me because the indenting style seems way off. Maybe itās the way weāre not delineating queries with ; in the same .sql file.#2019-09-1106:07Yehonathan Sharvitwas someone able to setup lispy and lispyville with spacemacs? Any advise whether we should prefer lispyville over clever-parens#2019-09-1111:25kirill.salykinhttps://github.com/kirillsalykin/dotfiles/blob/master/.spacemacs#L466#2019-09-1111:25kirill.salykinHope this would help#2019-09-1111:26kirill.salykinYou want also to include lispyville in extra packages#2019-09-1111:27kirill.salykinAs I mentioned earlier, clever-parens seems not maintained, and it had some issues, even may froze the emacs in some cases#2019-09-1111:27kirill.salykindont remember exact things#2019-09-1117:53Yehonathan SharvitI tried this morning and I had lots of issues#2019-09-1117:53Yehonathan SharvitTrying again now#2019-09-1119:08Yehonathan SharvitDo I need to also be in lispy mode or lispyville is enough?#2019-09-1119:20kirill.salykinLispyville is basically lispy#2019-09-1119:20kirill.salykinSo lispyvikle mode is enough #2019-09-1119:26Yehonathan SharvitI cannot make it work properly!#2019-09-1119:31Yehonathan Sharvitno matter what I do, j is not bound to lispy-down#2019-09-1119:31Yehonathan Sharvitsame for slurp and barf#2019-09-1121:47kirill.salykinLispyville works differently #2019-09-1307:46Yehonathan Sharvithow lispyville works?
I have read the README several times but I cannot get it#2019-09-1307:51kirill.salykinIt adds different keybibdigs similar to cp#2019-09-1307:51kirill.salykinBut I dunno maybe it is possible to have special mode as lispy does#2019-09-1500:35practicalli-johnny@viebel The package evil-cleverparens is part of the Clojure layer (`develop` branch) and has worked very well for me for the last year.
https://practicalli.github.io/spacemacs/install-spacemacs/evil-structural-editing.html
If you are happy using smartparens (lisp state) then evil-cleverparens is an appropriate choice to make vim editing honour structural editing.
Lispyvile does work very differently and needs some hacking to make it work and usable. I haven't seen a reliable tutorial to describe how to configure and use it with Spacemacs. Happy to try lispyvile out if there is such a tutorial, but I currently don't understand any advantage it brings.#2019-09-1110:08Yehonathan Sharvit?#2019-09-1500:35practicalli-johnny@viebel The package evil-cleverparens is part of the Clojure layer (`develop` branch) and has worked very well for me for the last year.
https://practicalli.github.io/spacemacs/install-spacemacs/evil-structural-editing.html
If you are happy using smartparens (lisp state) then evil-cleverparens is an appropriate choice to make vim editing honour structural editing.
Lispyvile does work very differently and needs some hacking to make it work and usable. I haven't seen a reliable tutorial to describe how to configure and use it with Spacemacs. Happy to try lispyvile out if there is such a tutorial, but I currently don't understand any advantage it brings.#2019-09-1221:42zugnushdoes anyone know how to make stacked discards eg ##, alter syntax highlighting for the next n forms? for me only the next form is affected?#2019-09-1221:45zugnushgrr eg #_#_#2019-09-1514:08Yehonathan Sharvit@jr0cket I am also set up with evil-cleverparens and I am quite happy#2019-09-1514:36scknkkrerError (use-package): org-projectile/:config: Symbol's function definition is void: org-projectile:per-repo
I couldnāt understand this.#2019-09-1612:20Yehonathan Sharvithow do you guys wrap a piece of text into double quotes with evil-cleverparens?#2019-09-1612:52jahsonIf it is a word and evil mode, you can use ysiw", which is provided by evil-surround.#2019-09-1612:54jahsonBasically, ys is the beginning of a "phrase", iw is a "movement", and the " is the "wrapper".#2019-09-1612:55jahsonhttps://github.com/emacs-evil/evil-surround#2019-09-1612:56jahsonAnd the original vim plugin https://github.com/tpope/vim-surround#2019-09-1613:27Yehonathan SharvitI was expecting evil-cleverparens to handle it, like it allows me to wrap an expression with ()#2019-09-1616:49theeternalpulseIs there a way to prevent midnight from closing active window buffers?#2019-09-1617:44agcheck standard-hooks#2019-09-1616:50theeternalpulseSometimes I come back from the weekend and see that most of my window buffers are closed, so I have either my window configuration full of scratch buffers or some other buffer that wasn't old enough to close populating all three windows#2019-09-1618:05practicalli-johnny@viebel I use SPC v to select a word and then use s to surround it with what ever I type next.
You can also change a surrounding character using cs followed by the character you want to replace and then the new surrounding character.
https://practicalli.github.io/spacemacs/editing/vim-style/vim-tips-for-developers.html#2019-09-1621:55Yehonathan SharvitNice trick @jr0cket.
The only issue is that if the region to surround contains double quotes, they wonāt be escaped#2019-09-1806:05jumarHas someone ever head problems with env vars in Spacemacs, more specifically JAVA_HOME?#2019-09-1806:07jumarI'm not sure when that started to happen (can be a few days ago) but suddenly my JAVA_HOME is set to 1.8 although I use 11 almost everywhere.
I'm on Mac OS X.
I certainly have such 11 set in my shell and even in the OS environment it seems (e.g. HelloWorld run in Intellij IDEA reports 11).
I use jenv to manage java home and event set it in /Library/LaunchDaemons/setenv.java.plist#2019-09-1806:08spfeifferSpacemacs has a .env file that contains the env variables and values it āseesā. These are not the ones you set in your shell.#2019-09-1806:09spfeifferI still not get the rationale for this āfeatureā.#2019-09-1806:21jumarHm, I had two values there; delete them but still no change.#2019-09-1806:24jumarIt seems that I need to start the GUI app from the terminal...#2019-09-1806:28ag@U06BE1L6T first SPC f e C-e, then SPC f e e - check if JAVA_HOME is there#2019-09-1806:29jumarIt is!#2019-09-1806:30jumarI think it used to work properly with jenv - e.g. when I ran the repl in a directory where jenv local version was 1.8 it used 1.8. For other projects it used 11#2019-09-1806:30agthen try adding it manually to exec-path-from-shell-variables#2019-09-1806:31aghave you played with graal? graal can fubar java#2019-09-1806:31jumarsome time ago#2019-09-1806:31jumarI actually think I might have executed force-init-spacemacs-env accidentaly in the past#2019-09-1806:31agthen in emacs open eshell and type which java#2019-09-1806:31jumarbefore that it was working ok I think#2019-09-1806:33agmake sure itās pointing to the version you want#2019-09-1806:47jumarHm, still doesn't work as expected. It's setting duplicate JAVA_HOME values.
Maybe I need to do this somewhere in emacs config:
echo 'eval "$(jenv init -)"'
#2019-09-1806:48jumarThis is what I have in my /etc/profile:
eval "$(jenv init -)"
eval "$(jenv enable-plugin export)"
#2019-09-1806:58jumarNo luck, very frustrating š. It used to work just fine - proper java version was picked up as per jenv settings (as in terminal).#2019-09-1806:59practicalli-johnnyIt sounds like you have different Java settings between shell and login shell. I.e a terminal has one setting and gui apps have another#2019-09-1807:00jumarThat might be true since it's notoriously hard to set this in Mac OS, but at least InteliJ IDEA seems to have the right setting#2019-09-1807:01jumarI'm using this jenv thing and its exporter plugin and also setting it in /Library/LaunchDaemons/setenv.java.plist#2019-09-1807:04jahson~/.spacemacs.env#2019-09-1807:04jumarI checked that and also deleted the JAVA_HOME occurences#2019-09-1807:04jumarAt this point, I have no idea where the emacs app is getting its' env...#2019-09-1807:06jahsonYou could rename the .spacemacs.env and try to find out what would happen.#2019-09-1807:06jumarI did it and I think spacemacs automatically re-created it#2019-09-1807:06jumarwill try one more time#2019-09-1807:07jumarYes, the same thing again#2019-09-1807:09jahsonSo, basically, it uses the wrong JDK?#2019-09-1807:09jumarYes#2019-09-1807:09jumarBut now I kept that file and just removed all the content and it's at least using the proper global JDK (11)#2019-09-1807:10jumarbut it still doesn't work with "local versions" that is for projects that have different java set locally with jenv (like 1.8)#2019-09-1807:11practicalli-johnnyHave you looked at section 11 of http://develop.spacemacs.org/doc/DOCUMENTATION.html#2019-09-1807:11jumarit seems I need to do this trick with:
eval "$(jenv init -)"
eval "$(jenv enable-plugin export)"
#2019-09-1807:12jumardoes anyone know how to do that?#2019-09-1807:12jumar@U05254DQM not yet, will check it#2019-09-1807:15jahsonLooks like the section 11.2 can be somewhat helpful#2019-09-1807:18jumarI'm now trying the latest develop version. It's been a long while since I updated it the last#2019-09-1809:03jumarAfter removing JAVA_HOME related stuff from .spacemacs.env, removing everything from various .plist files (/Library/LaunchDaemons/setenv.java.plist, ~/.MacOSX/environment.plist, ~/Library/LaunchAgents/environment.plist) and restarting my computer a couple of times it finally works as before!
Thanks everyone for your help#2019-09-1809:12jumarI also added the jenv init code (see above) to .bash_profile but not sure if that had any effect at all.#2019-09-1905:13spfeifferOh my, what a ride⦠š#2019-09-1906:01jumarYeah, kind of unexpected 3 hours spent on this thing š#2019-09-1821:50Drew Verleegeneral emacs question, has anyone found a way to fold jsx? e.g <div> <h2>* pressing fold at h2 would collapse everything inside of it. I really like being able to look at as little code as possible, i'm willing to use other methods beyond fold to achieve that. RIght now the fold function i use folds all the jsx into one ... fold.#2019-09-1821:53Drew Verleein that same vein, but for editing clojure, i feel like i could probably use something more powerful then fold. Like a focus, that hid everything on the page except the s-expression i picked.#2019-09-1821:54Drew Verleemaybe a heavy blur on other code#2019-09-1821:54Drew Verleemaybe intelliji does this š#2019-09-1822:07practicalli-johnny@drewverlee SPC n f will give you exact focus on the current function under the cursor. I use narrowing mainly for find/replace, but could be useful for focus.
You can also narrow to page or region.
SPC n w to restore the full view.#2019-09-1822:07Drew Verleethats cool#2019-09-1822:08practicalli-johnnyhttps://practicalli.github.io/spacemacs/editing/evil-tools/narrowing.html#2019-09-1822:08practicalli-johnnyYes, it's something lisp developers have used a lot#2019-09-1822:16Drew Verleeawesome! thanks a lot for putting this together and answering questions on slack.#2019-09-2014:57jumarI recently updated my spacemacs (develop branch) and now I got a different tree viewer - Treemacs instead of Neotree. Is it possible to "synchronize" the tree with the current buffer?
Before it would select the current buffer in the tree automatically after pressing SPC p t now it just (it seems) stays at the last position.
Btw. I often have multiple projects/layouts open at the same time (not sure if that can affect it)#2019-09-2017:02jahsonFor me it works out of the box, when the project is present in treemacs.
https://github.com/syl20bnr/spacemacs/blob/develop/layers/+filetree/treemacs/README.org#follow-mode#2019-09-2017:24jumarhmmmm, that variable is true in my setup but it doesn't work for some reason..#2019-09-2017:26jumarAt least SPC f T seems to work#2019-09-2017:27jumarUnrelated - this looks cool#2019-09-2017:42practicalli-johnnyI assume you replaced neotree with treemacs in the dotspacemacs/layers section of your .spacemacs file.
Maybe it just needs Emacs to be restarted for treemacs to start working correctly#2019-09-2018:08jumarWell, I haven't configured anything - it's enabled automatically#2019-09-2018:09jumar(at least nothing I know about - I just fetched changes from the develop branch)#2019-09-2015:14murtaza52I enabled the javascript layer on the spacemacs, however I dont see documentation (SPC m h - in other layers) - is there a way to enable / add it ?#2019-09-2017:47practicalli-johnny@murtaza52 On the Spacemacs develop branch the JavaScript layer docs are there under SPC h SPC and selecting javascript in the layer list. If you are on Spacemacs master then perhaps you found a bug or something missing (sorry, I havent used Spacemacs master for several years)#2019-09-2017:48practicalli-johnnyYou could always read the javascrtipt docs online http://spacemacs.org/layers/+lang/javascript/README.html#2019-09-2017:49practicalli-johnnyor if you are using develop then they are here http://develop.spacemacs.org/layers/+lang/javascript/README.html#2019-09-2017:49murtaza52@jr0cket I am on the develop branch. SPC h SPC brings up helm-spacemacs-help#2019-09-2017:50practicalli-johnnywhich should also list all the layers... try typing javascript in the helm popup#2019-09-2017:50practicalli-johnnywhere it says pattern#2019-09-2018:18murtaza52typing in javascript brings up the documentation for the javascript layer.
However I would like to see docs for js functions ex [1,2].unshift(), I would like to see the doc for unshift#2019-09-2018:20practicalli-johnnyAh, you mean the auto-completion documentation. If auto-completion already works for other languages, it should just work for JavaScript too (assuming its supported). You shouldnt need to configure anything, unless something is broken.#2019-09-2018:22practicalli-johnnyWhat settings do you have for auto-completion layer in your .spacemacs file?#2019-09-2018:24practicalli-johnnyI have this in dotspacemacs/layers
(auto-completion :variables
auto-completion-enable-help-tooltip t
auto-completion-enable-snippets-in-popup t
auto-completion-enable-sort-by-usage t)
;; To have auto-completion on as soon as you start typing
;; (auto-completion :variables auto-completion-idle-delay nil)
#2019-09-2018:28practicalli-johnny@murtaza52 did you install tern to get the auto-completion and documentation features
npm install -g tern#2019-09-2018:43murtaza52yup have installed tern, and auto complete is working, however documentation is not. I am not even sure if the documentation feature is there bcoz neither do I see it in the shortcuts or in the docs on the webpage.#2019-09-2018:44murtaza52This is what I am trying to do - in clojure if I write repeat and then SPC m h, it will show me the docs for that fn. Can I get similar docs for js functions ?#2019-09-2020:12johanatanhi, at one point, i had my emacs clojure mode to consider full clojure tokens as a "word" from vi perspective. i seem to have somehow lost that (even though the code for it is still in my .spacemacs). does anybody else have this enhancement currently working?#2019-09-2020:13johanatan[it would consider things like :a-keyword or aCamelCasedWord or a_snake_cased_word a full-word for the purposes of the evil-forward-word-xxx and evil-backward-word-xxx functions].#2019-09-2020:48flefiklooking at the source there doesnāt appear to be a config for it, but you can use evil-forward-WORD-xxx ?#2019-09-2020:49flefikhttps://github.com/emacs-evil/evil/blob/874beba2cb243c325eca08fb7badff567f3c9494/evil-commands.el#L354#2019-09-2020:49flefikso maybe you just want to remap that?#2019-09-2020:50flefikit defaults to w -> W, b -> B, e -> E etc.#2019-09-2020:50johanatannah, the setup i had was somewhere in between the two#2019-09-2020:50johanatanW is a little too coarse grained for my tastes#2019-09-2020:51johanatanbut yea what i want is probably closer to W than w#2019-09-2020:52flefikit mustāve been a custom function then#2019-09-2020:53johanatanno, it was a reconfig of what is considered a token for that function's purpose#2019-09-2020:53johanatanlike a map tweak#2019-09-2020:53johanatanhere's the code that i copied several years ago to pull it off#2019-09-2020:53johanatan(if nil (with-eval-after-load 'clojure-mode
(dolist (c (string-to-list ":_-?!#*"))
(modify-syntax-entry c "w" clojure-mode-syntax-table ))))
#2019-09-2020:54johanatani had pulled it from a blog post somewhere#2019-09-2020:54johanatanbut for some reason, it stopped working in the last month or two#2019-09-2020:54flefikcould it be in thing-at-point?#2019-09-2020:54johanatanwhat do you mean?#2019-09-2020:56flefiksomething like this?#2019-09-2020:56flefikhttps://emacs.stackexchange.com/questions/31080/get-thing-at-point-to-include-periods#2019-09-2020:57johanatanthat looks like another way to achieve it yes. but i am asking about the code that i pasted above#2019-09-2020:57flefikhttps://www.emacswiki.org/emacs/EmacsSyntaxTable#2019-09-2020:57johanatanno need to switch approaches entirely especially when one approach has worked for literally 5 years and probably just needs a tweak to stay current with other changes...#2019-09-2020:57flefikah yes, thatās what evils forward word is using under the hood#2019-09-2020:57flefikit uses thing at point which uses that syntax table#2019-09-2020:58johanatanso do you see why my code above to modify the syntax table would have suddenly stopped working in the last couple of months?#2019-09-2020:59flefikim not great at elisp#2019-09-2020:59flefikbut (if nil looks suspicious#2019-09-2021:00johanatanoh, wow. haha#2019-09-2021:00johanatanyou're right.#2019-09-2021:00johanatani think i commented it out because it started acting funky#2019-09-2021:00johanatanoh, that's right. it was getting "stuck"#2019-09-2021:00johanatanlike a 'w' would just not move the cursor any further in the file#2019-09-2021:01flefikwas that it?#2019-09-2021:03flefikthat works for me.#2019-09-2021:03flefikgonna stick this in my user-config, thanks#2019-09-2021:03johanatanhaha#2019-09-2021:03johanatanlol#2019-09-2021:03johanatani haven't tried it yet but let me give it another try#2019-09-2021:04johanatancould have been something else at the time that was conflicting with it#2019-09-2021:04flefiki deleted the trailing space too, but that shouldnt matter#2019-09-2021:04johanatanglad i could be of assistance lol#2019-09-2021:04johanatanš#2019-09-2021:05johanatannope, still doesn't work for me#2019-09-2021:05johanatangets stuck at the ends of lines#2019-09-2021:06johanatanmust be bad interaction with something else i have going on#2019-09-2021:12flefikim not seeing that#2019-09-2021:12johanatanyea š#2019-09-2021:12johanatanwanna see my whole .spacemacs file?#2019-09-2021:13flefikif you drop it here i can take a look tomorrow#2019-09-2021:13flefikhave to go to sleep now š#2019-09-2021:13johanatanok, thanks!#2019-09-2021:14johanatan#2019-09-2021:19flefikTry commenting this out#2019-09-2021:19flefik(defun delete-sexp ()
(interactive)
(delete-region (point) (save-excursion (forward-sexp) (point))))
(defun delete-file-form-at (filename line column)
(do-file-action-at filename line column 'delete-sexp))
(defun symbol-at-point ()
(interactive)
(message (thing-at-point 'symbol 'no-properties)))
(defun list-at-point ()
(interactive)
(message (thing-at-point 'list 'no-properties)))
(defun sexp-at-point ()
(interactive)
(message (thing-at-point 'sexp 'no-properties)))
(defun word-at-point ()
(interactive)
(message (thing-at-point 'word 'no-properties)))
(defun sentence-at-point ()
(interactive)
(message (thing-at-point 'sentence 'no-properties)))
(defun skip-whitespace ()
(skip-chars-forward " \t\n"))
(defun next-thing (thing)
(save-excursion
(evil-forward-word-begin)
(thing-at-point thing 'no-properties)))
(defun sexp-word-at-point? (brace word)
(let ((nxt-sexp (next-thing 'sexp)))
(and (string-prefix-p brace (thing-at-point 'sexp 'no-properties))
(string= nxt-sexp word))))#2019-09-2021:19flefiklooks related#2019-09-2021:20flefikgood night!#2019-09-2021:23johanatanThose are just free functions #2019-09-2021:23johanatanTheyāre not invoked except explicitly by meta-x.#2019-09-2021:23johanatanGood night! #2019-09-2311:26flefikDid you figure it out?#2019-09-2021:23ag@johanatan https://clojurians.slack.com/archives/C09C8GRLY/p1569012833061100?thread_ts=1569010396.058500&cid=C09C8GRLY
that might not be enough, you may want to consider something like:
(defun clojure--hyphens-in-words () (modify-syntax-entry ?- "_-?!#*"))
(add-hook 'clojure-mode-hook #'clojure--hyphens-in-words)
(add-hook 'clojurescript-mode-hook #'clojure--hyphens-in-words)
(add-hook 'clojurec-mode-hook #'clojure--hyphens-in-words)
#2019-09-2021:33johanatan@ag is that substantially different from:
(with-eval-after-load 'clojure-mode
(dolist (c (string-to-list ":_-?!#*"))
(modify-syntax-entry c "w" clojure-mode-syntax-table )))
?#2019-09-2021:34aghmm⦠actually youāre right. I wasnāt paying attention. Yeah, this way should work and itās better#2019-09-2021:35aghowever, I just found that thereās also clojurescript-mode-syntax-table#2019-09-2021:36johanatanyea, i could add that one but i don't think it will help my "getting stuck at end of line" problem#2019-09-2021:36johanatanalthough perhaps it would since i am in fact in cljs at the moment#2019-09-2021:40agyou mean itās getting āstuckā at the end of sexp? at closing paren or bracket?#2019-09-2105:55johanatanseems to be almost any line actually.#2019-09-2023:23Mario C.I upgraded my packages and now spacemacs freezes when I connect to a repl#2019-09-2023:24Mario C.maybe i shouldn't have upgraded all 150 packages#2019-09-2023:30Mario C.The moment I get the Direct connection to localhost established message and I type anything it freezes.#2019-09-2023:31Mario C.using CIDER 22.3#2019-09-2110:16practicalli-johnny@mario.cordova.862 I upgraded yesterday (`develop` branch) and the CIDER REPL is working okay for me so far. Same CIDER version as you. Did you restart Emacs again after updating all the packages? Also make sure you update Spacemacs itself and your .spacemacs file from the template SPC f e D
#2019-09-2314:34Mario C.Yes I did restart. And by updating spacemacs itself do you mean doing a git pull in the .emacs.d directory? Because I did do that. I start the REPL and freezes but I can work around it by doing C-g. I see a message that says Error in process filter : Quit [2 times]. But now I can switch to the REPL buffer and it seems to work fine.#2019-09-2316:15practicalli-johnnyDid you update your .spacemacs file from the template, using SPC f e D#2019-09-2316:16practicalli-johnnyI assume it's been a while, so there may be some important changes to copy across from the Spacemacs template, especially if it's been a while since you updated Spacemacs.#2019-09-2316:20practicalli-johnnyI suggest trying the simplest Clojure or ClojureScript project, to check the issue is not caused by a library.
Also try using the Emacs debug tools https://github.com/syl20bnr/spacemacs/wiki/Debugging#enable-debug#2019-09-2316:21practicalli-johnnyYou could also comment out any layers you don't need, then adding them back one by one and see which breaks#2019-09-2322:52Mario C.Yea it was specific to a project. Some how tools.nrepl is being added as a dependency but I dont see it in the deps tree. So gotta look into more#2019-09-2307:38jumarEmacs is "deleting orphaned package flycheck-clj-kondo" and I don't know why.
I do have that package listed in dotspacemacs-additional-packages#2019-09-2307:57practicalli-johnny@jumar this is okay, we have simplified the way you add clj-kondo to Spacemacs
https://github.com/syl20bnr/spacemacs/tree/develop/layers/+lang/clojure#enable-clj-kondo-linter#2019-09-2307:58practicalli-johnnyYou can remove the previous config for this (in additional packages and user-config)#2019-09-2307:59jumarGreat, thanks. Will look at that config soon.#2019-09-2309:34jumarHm, for some reason it doesn't work at all.
This is the only thing I did:
(clojure :variables
clojure-enable-clj-refactor t
clojure-enable-linters 'clj-kondo)
#2019-09-2309:36jumarApart from that I commented out my earlier configuration for clj-kondo.
In .spacemacs there's still this bit in the custom-set-variables:
'(package-selected-packages
(quote
(flycheck-clj-kondo
#2019-09-2309:38jumarAnd I also have joker:
dotspacemacs-additional-packages '(
flycheck-joker
...
#2019-09-2309:47kommen@jumar did you enable the syntax-checking layer?#2019-09-2309:48jumarYes, I added it a long time ago in dotspacemacs-configuration-layers; but the docs (linked above) don't mention that#2019-09-2312:34practicalli-johnny@jumar you will need develop branch from at least the start of September 2019 for this new method of clj-kondo to work#2019-09-2312:34jumarI have that#2019-09-2312:34practicalli-johnnydid you restart Spacemac? and is clj-kondo on your system PATH?#2019-09-2312:35jumarOh no, I though I have, but it seems I reverted it back because of some issues? š®#2019-09-2312:35practicalli-johnnyš#2019-09-2312:36jumar(trying again)#2019-09-2312:39jumarUnfortunately, that doesn't seem to help (latest develop).
Is there any requirement on the Emacs version (I'm on Mac OS X)?#2019-09-2312:40jumar(currently using 25.3)#2019-09-2312:40borkdude@jumar I usually try flycheck-compile in a buffer when I try to debug flycheck issues. Maybe that helps. My 2 cts, I know 0 about spacemacs.#2019-09-2312:41jumarThanks for the tip! That reported the problem correctly#2019-09-2312:42jumarIt's just not shown in (`SPC e l`)#2019-09-2312:42jumarMaybe the problem is that I have both joker and kondo?#2019-09-2312:43borkdudeI have that too in Emacs, but then again, no spacemacs#2019-09-2312:45practicalli-johnny@jumar I dropped joker as clj-kondo was more than enough coverage for me. Try comment out the joker code in your .spacemacs file. They should work together, but if you comment out the joker code then its one less potential place for failure.#2019-09-2312:45jumarOk, will try that.#2019-09-2312:46jumar@borkdude any special areas in which joker is still better - some particular types of errors it can detect that clj-kondo cannot?#2019-09-2312:46practicalli-johnnyIf its helpful, my current .spacemacs file is at https://gist.github.com/ef3086a61a219e4b4d37b354fcdd32b7#2019-09-2312:47borkdude@jumar I have a hard time coming up with any as I'm trying to complete with other linters#2019-09-2312:47borkdudebut if you know some, please let me know š#2019-09-2312:49practicalli-johnny@jumar suggest you would get more value with clj-kondo running as a flycheck backend (as the Clojure layer option) and then running eastwood/kibit as a one of process before sharing commits or as part of CD/CI pipeline. Although clj-kondo catches 99.9% of things anyway#2019-09-2312:51jumarFinally sort it out - the final piece was removing clojure-lint layer which I forgot about (searching only for joker inside the .spacemacs file)#2019-09-2312:51jumar@jr0cket @borkdude thanks a lot!#2019-09-2312:53practicalli-johnnyI was thinking of adding joker as an option to the clojure-enable-linters but I am unsure if we need both as @borkdude as added so much to clj-kondo. I've recommended dropping joker in my Spacemacs book and just use clj-kondo because its so awesome. Thanks#2019-09-2313:32lreadFWIW, I dropped joker and only use clj-kondo now.#2019-09-2313:40malchjoker shows unused private vars, that's probably it simple_smile#2019-09-2313:41malchI mean the only added functionality#2019-09-2313:50borkdudeThat wouldnāt be too hard to include in kondo. Maybe thereās already an issue for it.#2019-09-2313:54malchIt would be great :thumbsup:#2019-09-2314:01borkdudecouldn't find the issue, so created one: https://github.com/borkdude/clj-kondo/issues/472#2019-09-2314:57lreadin the meantime, clj-kondo analysis data and tools can report on unused private vars: https://github.com/borkdude/clj-kondo/tree/master/analysis#private-vars#2019-09-2314:58borkdudetrue that š#2019-09-2314:59lreadhey @borkdude, have we thanked you for clj-kondo yet? simple_smile#2019-09-2315:00borkdudeI'm almost drawning in thank you's, thanks a lot š#2019-09-2315:02spfeifferAlso only using Kondo now.#2019-09-2315:05lreadhey @jr0cket have we thanked you for all your spacemacs guides and help yet? (Iām feeling grateful today)#2019-09-2316:10practicalli-johnnyAlways nice to get another thank you. Just updating the linter section today š. Lots more updates in the next few weeks#2019-09-2403:53zugnush@borkdude kondo is still experimental on windows, right? I'm using joker on windows at work at the moment#2019-09-2720:42borkdudeI missed this message, sorry. Yes, that's true, Windows is a bit experimental, but as a JVM lib it still works. Of course the startup time isn't as good with that.#2019-09-2413:20sashtonIs it possible to include a file glob for spacemacs/helm-project-do-rg?
Iām trying to replicate the following command linie search: rg --vimgrep --no-heading --smart-case -g '*.clj' 'inc'
The helm search input doesāt seem to like options like -g in the search pattern.
Is there some other way to supply rg options?#2019-09-2416:57agafaik you have to provide search term first and then the additional params#2019-09-2417:59sashtonIāve tried that (as far as I can tell):
pattern: inc -g "*.clj"
error: The following required arguments were not provided:
<PATTERN>
USAGE:
rg [OPTIONS] PATTERN [PATH ...]
rg [OPTIONS] [-e PATTERN ...] [-f PATTERNFILE ...] [PATH ...]
rg [OPTIONS] --files [PATH ...]
rg [OPTIONS] --type-list
command | rg [OPTIONS] PATTERN
For more information try --help
#2019-09-2418:01sashtonor is there another way to specify the parameters after the fact?#2019-09-2418:52practicalli-johnny-g*.clj fish should show only results of searching for fish from files ending in .clj#2019-09-2418:52practicalli-johnny-g!*.md fish will search for fish for all files except those ending in .md#2019-09-2418:54practicalli-johnnyThese work on the Spacemacs develop branch with ripgrep - on my machine anyway š#2019-09-2419:29sashton@U05254DQM Thank you! The problem I had was adding a space between -g and *.clj#2019-09-2419:30practicalli-johnnyI am sure I did that too at first š#2019-09-2420:07practicalli-johnnyI added a section to the book about searching
https://practicalli.github.io/spacemacs/working-with-projects/searching-projects.html#2019-09-2417:12Mario C.When connecting to CIDER emacs freezes on connection. I can do C-g a few times and it unfreezes and I can use the REPL as normal. What could be causing this freeze? I have this backtrace but I can't really make sense out of it. Debugger entered--Lisp error: (quit)
accept-process-output(nil 0.01)
nrepl-send-sync-request(("op" "version" "prefix-rewriting" "false" "debug" "false") #<buffer *cider-repl Projects/decision-service:localhost:63335(clj)*> nil)
cider-nrepl-send-sync-request(("op" "version" "prefix-rewriting" "false" "debug" "false"))
cljr--call-middleware-sync(("op" "version" "prefix-rewriting" "false" "debug" "false") "version")
cljr--middleware-version()
cljr--check-middleware-version()
cljr--init-middleware()
run-hooks(cider-connected-hook)
#f(compiled-function () #<bytecode 0x4631a541>)()
#f(compiled-function (buffer) #<bytecode 0x4503830d>)(#<buffer *cider-repl Projects/decision-service:localhost:63335(clj)*>)
#f(compiled-function (response) #<bytecode 0x44bb38dd>)((dict "id" "4" "session" "7abfa665-75ed-4a05-82d3-2e2d5dfe88ab" "status" ("done")))
#f(compiled-function (response) #<bytecode 0x44bb391d>)((dict "id" "4" "session" "7abfa665-75ed-4a05-82d3-2e2d5dfe88ab" "status" ("done")))
nrepl--dispatch-response((dict "id" "4" "session" "7abfa665-75ed-4a05-82d3-2e2d5dfe88ab" "status" ("done")))
nrepl-client-filter(#<process nrepl-connection> "d2:id1:42:ns40:com.pmu.decision-service.handler7:session36:7abfa665-75ed-4a05-82d3-2e2d5dfe88abed2:id1:47:session36:7abfa665-75ed-4a05-82d3-2e2d5dfe88ab6:statusl4:doneee")
#2019-09-2417:13Mario C.This seems to only be happening on a specific project so I am guessing some sort of dependency is causing it but I have no idea which one is the culprit. Is this a case of having to go one by one until I find the dependency that is causing the freeze?#2019-09-2507:16practicalli-johnnyDisable clj-refactor and sayid if you have them enabled, they can also trip up on certain libraries.#2019-09-2507:18practicalli-johnnyIf you have any code that automatically runs when you load the project, try comment that out. The same with switching to a namespace. If you have a user.clj file these also seem to have caused problems recently.#2019-09-2507:22practicalli-johnnyIt could be that two of your dependencies have a dependency on the same library but require different versions. Print out the dependency tree to see if there is conflicts (`clj -Stree` if itās a Clojure CLI project)#2019-09-2507:24practicalli-johnny lein deps :tree if using Leiningen #2019-09-2515:08Mario C.The freeze only seems to be happening when I start a REPL through spacemacs. But if I start the repl on the terminal with lein. I get Error loading complete.core; Could not locate . . . yadda yadda yadda But it starts the the REPL regardless. Then I can connect with it using CIDER from Spacemacs and it wont freeze. But It does give me a warning WARNING: CIDER requires cider-nrepl to be fully functional. Some features will not be available without it!
More information.WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.5.0-SNAPSHOT (package: 20190618.716) and n/a, respectively.
You can mute this warning by changing cljr-suppress-middleware-warnings.#2019-09-2515:09Mario C.How would I disable clj-refactor if it is listed as a dependency?#2019-09-2518:09practicalli-johnnyI would be surprised if clj-refactor is a dependency in your project.clj file, if it is, simply comment the line or delete it.
I assume you have included clj-refactor in spacemacs by defining the clojure layer as follows
dotspacemacs-configuration-layers
'(
(clojure :variables
clojure-enable-clj-refactor t
clojure-enable-linters 'clj-kondo)
)#2019-09-2518:10practicalli-johnnyIf so, simply set clojure-enable-clj-refactor t to clojure-enable-clj-refactor nil or just remove that line altogether.#2019-09-2518:10practicalli-johnnyclj-refactor is not included in the Clojure layer by default (in develop branch)#2019-09-2518:11practicalli-johnnyIf this is not the case, check your dotspacemacs/user-config section for code that is including clj-refactor#2019-09-2518:15practicalli-johnnywhen running cider-connect you need to supply the right versions of nrepl libraries that CIDER uses, otherwise you get that warning message.
clojure-jack-in injects the right library versions for you, but this also includes clj-refactor if you have told the Clojure layer to include it.#2019-09-2518:16practicalli-johnnySPC u before cider-jack-in allows you to edit the command CIDER uses to call Leiningen and start the repl, so you can also check there as to what is included. That command should also end up in your SPC b m message buffer#2019-09-2518:17practicalli-johnnyexample in this blog post http://jr0cket.co.uk/2019/07/CIDER-jack-in-to-Clojure-CLI-projects-from-Spacemacs.html#2019-09-2519:34Mario C.I meant when I looked at package-show-package-list clj-refactor shows up as a dependency as opposed to 'available' or 'installed'. After switching to the develop its seems to be working fine now.#2019-09-2519:35Mario C.How did you know it was clj-refactor?#2019-09-2520:46practicalli-johnnyI am omniscient (and I saw your post in the cider channel) š#2019-09-2520:50Mario C.hmm but even my post mentions nothing about clj-refactor. Perhaps bozhidar knows from experience#2019-09-2520:52practicalli-johnnyIt's caused issues in the past. Ideally all its features will be merged into clojure-mode at some point#2019-09-2520:53Mario C.Got it. This one was a head ache so thanks for the help#2019-09-2508:04practicalli-johnnyI did a podcast about setting up Spacemacs and the basic workflow I use. I would be interested in any feedback. Thanks
https://clojurescriptpodcast.com/#2019-09-2901:11Drew VerleeI just listened to it, it was great overview. Thanks so much.#2019-09-2610:09michael zhouToday I updated my spacemacs (develop branch) and now every time I press enter or esc key, I need twice press. anyone know why?#2019-09-2611:29practicalli-johnnyDid you also update your .spacemacs file from the template, SPC f e D.
Have you restarted Emacs since the upgrade?
Have you updated the packages?#2019-09-2611:34practicalli-johnnyThis is the update process I use
https://practicalli.github.io/spacemacs/install-spacemacs/update.html#2019-09-2612:41michael zhouThanks. I will try to update .spacemacs file.#2019-09-2618:32jrwdunhamTotal noob question here, but what is a good practice for working simultaneously on multiple projects and using Spacemacs? I have 4 distinct repos/projects that I'm working on and one instance of Spacemacs running for each. I feel like I'm wasting lots of time CMD-TABing between Spacemacs instances and trying to figure out which project is open within them. Is there a better way? I'm guessing that there's some kind of "project" or "repo" abstraction that Spacemacs offers that I'm not making use of (which could allow me to open fewer instances). Any advice appreciated.#2019-09-2618:38aghttps://github.com/syl20bnr/spacemacs/blob/develop/doc/DOCUMENTATION.org#layouts-and-workspaces#2019-09-2618:51jrwdunhamThanks! very helpful.#2019-09-2620:38practicalli-johnnyI put each project in its own layout and have just one frame, then use SPC l TAB to swich to the previous projects. Or use SPC l 3 to swich to layout 3.
If you have more than 10 layouts, then SPC l l gives a helm list of layouts which you can narrow by typing the layout name (just like file find).
https://practicalli.github.io/spacemacs/why-spacemacs/layouts.html#2019-09-2621:01jumarYes, that's basically what I use too. It's worth noting that sometimes buffers end up in a wrong layer so you can also add/remove buffer to/from the current perspective.
And the default (the first one) will always contain all the open buffers#2019-09-2710:35michael zhouYou can try treemacs#2019-10-0116:23jrwdunhamYes, thanks all. I've found that using layouts makes things much better. Some things are still strange though; for example, if I space b b to view my cider repl buffers I can only access them from the default layout, which is ok, though I would prefer to be able to see the repl output streams in the same layout where I am executing expressions#2019-10-0116:28agSPC b B shows all the buffers from any layout#2019-10-0116:30agif youāre on a Mac, you can do something like:
(when (eq system-type 'darwin)
(global-set-key (kbd "s-b") 'spacemacs-layouts/non-restricted-buffer-list-helm))
#2019-10-0116:30agthat will bind āShow All buffersā to CMD+b#2019-10-0116:31agonce you switch to the buffer you like you can add it to the current layout: SPC l a#2019-10-0116:45practicalli-johnnyyou should be able to see the repl buffers with SPC b b in your Clojure layout if you type repl as the pattern in the helm popup for SPC b b. I was doing that earlier this year... unless that has changed now...#2019-10-0116:46practicalli-johnny, s s or M-RET s s will switch between source and associated repl buffer, opening a new window for the repl buffer if its not already open#2019-10-0116:53agah, but sometimes you have 2 independent repl buffers per project - for clojure and for clojurescript.#2019-10-0116:54agbut I think youāre right, , s s should automatically add the buffer to the list of layout buffers#2019-09-2821:39Drew Verlee[Edit: fixed via compute restart]: i added the clojure-lint to my dotspacemacs-configuration-layers as well as followed the instructions here: https://github.com/n2o/clojure-lint-spacemacs-layer. But dont seem to be getting the linting. Has anyone had success with this?#2019-09-2823:07Drew VerleeMe. Installs Joker on the day the reccomendation changes to kondo.#2019-09-2907:44practicalli-johnnyYou can still use joker, but so much work has been done on clj-kondo in the last few months itās worth replacing joker with it. Borkduke has done amazing work on clj-kondo.#2019-09-2901:06Drew VerleeI assume the best way to rename a function/defn is using clj refactors change symbol name. Are there other ways? The podcast mentions iedit, that's a text based replacement right?#2019-09-2907:42practicalli-johnny@drewverlee
Yes, you can use iedit to rename multiple instances of text in a buffer.
In Evil normal mode, if the cursor is on a symbol name, like a function name, def or let binding, then pressing * or ā#ā will highlight all instances and show the symbol transient menu. Pressing e will take you into iedit mode (turning the cursor red). Or you can just use / to search
You can then edit the highlighted text as normal and all other instances change at the same time.
Use narrowing before selecting / searching to be more selective in what text is show and therefore highlighted and changed. E.g. if you just want to change a specific function or range of text.
If you want to change text throughout a project, then press * or ā#ā to show the symbol transient menu. Use project search by selecting / which will display all matches throughout the project.
C-z will give you a list of actions you can perform on the results of the project search
F4 will open the results in a new buffer for editing.
Now we can use iedit again, SPC s e, on any text we select in the project search results. Or simply manually edit the file (or even use multiple cursors).
C-c C-c will commit the changes you have made, updating the changes throughout all the relevant files in the project.#2019-09-2908:08jumarSPC * is what I use most of the time#2019-09-2910:48practicalli-johnnyInteresting, so you can use SPC * instead of * and then / to open the project search on that symbol. Thanks.#2019-10-0314:31Drew Verleethanks!.
Right now i seem better at using projectile-replace. But ill look more into iedit.#2019-10-0314:39practicalli-johnnySPC p R for projectile-replace looks very handy, especially when its a simple case of replacing one name with a new one. Using helm-ag and iedit has a few more steps but can manage more complicated replacements, but most of the time replace should be just fine.#2019-09-2905:10spfeiffer@drewverlee I can only recommend updating to recent develop and using clj-kondo.#2019-09-2905:36euccastroI have spacemacs develop installed and cider-version says
CIDER 0.18.1snapshot (package: 20180923.1759)
but in the cider github project page I see that the melpa stable version is 0.22.1. is that normal? for example, I don't seem to have cider-clojuredocs even though it's bound to ,hd in spacemacs#2019-09-2905:43euccastronevermind, I just noticed the Update Packages thing in the spacemacs buffer š³#2019-09-2907:42practicalli-johnny@drewverlee
Yes, you can use iedit to rename multiple instances of text in a buffer.
In Evil normal mode, if the cursor is on a symbol name, like a function name, def or let binding, then pressing * or ā#ā will highlight all instances and show the symbol transient menu. Pressing e will take you into iedit mode (turning the cursor red). Or you can just use / to search
You can then edit the highlighted text as normal and all other instances change at the same time.
Use narrowing before selecting / searching to be more selective in what text is show and therefore highlighted and changed. E.g. if you just want to change a specific function or range of text.
If you want to change text throughout a project, then press * or ā#ā to show the symbol transient menu. Use project search by selecting / which will display all matches throughout the project.
C-z will give you a list of actions you can perform on the results of the project search
F4 will open the results in a new buffer for editing.
Now we can use iedit again, SPC s e, on any text we select in the project search results. Or simply manually edit the file (or even use multiple cursors).
C-c C-c will commit the changes you have made, updating the changes throughout all the relevant files in the project.#2019-09-2908:10practicalli-johnny The symbol highlight transient state is a really useful menu for finding names of things
https://practicalli.github.io/spacemacs/navigating-code/names-symbols.html#2019-09-2910:51practicalli-johnnyInteresting, I just noticed if you did TAB on a function name it lists all the matching functions.
For example, i pressed TAB when the cursor was on reduce and a helm popup appeared listing a search of all matching functions in Clojure core. That's nice.#2019-09-2910:52practicalli-johnnyAh, if you select one of the alternative functions listed in the helm popup it replaces it for you (just at the cursor though)#2019-10-0310:21kirill.salykinhi guys,
I was trying to try vterm, but it fails with cmake command not found#2019-10-0310:21kirill.salykinPlease advice what can be wrong?#2019-10-0314:55prncSee: https://github.com/syl20bnr/spacemacs/tree/develop/layers/+tools/shell#install-cmake-311-or-higher maybe that helps?#2019-10-0315:08kirill.salykinnow everything works, thanks a lot!#2019-10-0315:03kirill.salykinthanks#2019-10-0315:04kirill.salykinof course, one should install it first š
stupid me, thanks#2019-10-0410:20clariceHello there, I want to refactor a namespace. When I try , r r s on the ns then I get cljr-rename-symbol: Wrong type argument: char-or-string-p, nil#2019-10-0508:05practicalli-johnnyMany of the clj-refactor commands require a Clojure REPL is running. This might be the cause of the error.
You may also find projectile-replace a useful alternative for changing a symbol name across a project.
There are some more refactor approaches covered at
https://practicalli.github.io/spacemacs/refactor/#2019-10-0411:32flefikHow can I make copy work in spacemacs when running emacs -nw inside iterm2 on Mac OS?#2019-10-0501:36jahsonhttps://github.com/syl20bnr/spacemacs/issues/10896#issuecomment-415405504
(emacs 26+)#2019-10-0514:54flefikty#2019-10-0418:19Abhinav SharmaHello everyone š
I was wondering if someone could point me to good resources for debugging clojure(script) code via spacemacs ( or cursive). Would be great if you could share your own debugging setup#2019-10-0508:18practicalli-johnny, d b or M-RET d b to instrument a specific function. When calling that function the the cider-debugger will start and allow you to step through the code and show you the intermediate values along the way.
I use this for Clojure code. Not sure if there is the same for ClojureScript, I tend to just use figwheel-main error reporting, the repl and browser Dev tools#2019-10-0509:54Abhinav Sharma@U05254DQM, I gave it a shot and got this working for sure - need to learn the stepping functions for sure š
Thanks!#2019-10-0511:44practicalli-johnnyI just use n for next, seems to be all I need. If I am debugging with a lazy sequence, I may need to use o to step out of the specific expression and evaluate its parent expression. For example if I have a (range) function inside a (take 20 ,,,) function, then I use o to skip outside the range call and call the take expression instead. I havent really used the other debugging options yet.#2019-10-0517:41Abhinav SharmaYup, tried that and first time ever - I actually debugged clojure code š
The experience is kinda nice, I canāt wait to explore this thing in debugging apart from the repl itself.#2019-10-0419:36mafcocinconewb question: Can someone point me at the documentation for emacs mode (i.e. non-`evil`) for the Clojure layer? Specifically, I'm interested in this: http://spacemacs.org/layers/+lang/clojure/README.html#key-bindings for emacs mode.#2019-10-0421:42theeternalpulsehttps://github.com/clojure-emacs/clojure-mode/?#2019-10-0421:42theeternalpulsea good tip is if you want to find the major mode name do C-h m which brings you into the current mode help#2019-10-0421:43theeternalpulseyou'll see all the minor modes and the current major-mode#2019-10-0421:43theeternalpulseyou can usually find a mode name to search and find the project page, or even scour through the code, though backtracing some of the keymaps and stuff are a little tough in emacs#2019-10-0508:13practicalli-johnny@mafcocinco there is a standard substitution you can make for the keybindings
M-RET where you see SPC m or ,
M-m where you see SPC followed by characters
C-u instead of SPC u for the universal argument
M is meta key, e.g Alt on PC or Option on Mac
RET is the return/enter key
C is the command key#2019-10-0508:05practicalli-johnnyMany of the clj-refactor commands require a Clojure REPL is running. This might be the cause of the error.
You may also find projectile-replace a useful alternative for changing a symbol name across a project.
There are some more refactor approaches covered at
https://practicalli.github.io/spacemacs/refactor/#2019-10-0508:13practicalli-johnny@mafcocinco there is a standard substitution you can make for the keybindings
M-RET where you see SPC m or ,
M-m where you see SPC followed by characters
C-u instead of SPC u for the universal argument
M is meta key, e.g Alt on PC or Option on Mac
RET is the return/enter key
C is the command key#2019-10-0508:18practicalli-johnny, d b or M-RET d b to instrument a specific function. When calling that function the the cider-debugger will start and allow you to step through the code and show you the intermediate values along the way.
I use this for Clojure code. Not sure if there is the same for ClojureScript, I tend to just use figwheel-main error reporting, the repl and browser Dev tools#2019-10-0614:58mafcocinco@jr0cket Thanks for the response! appreciate it.#2019-10-0714:59practicalli-johnnyAnyone have a working setup for pairing using Tmux in Spacemacs when each pair has different keyboard layouts?
https://groups.google.com/forum/m/#!topic/clojure/GzgGmV9XJzY
Also asked on #emacs by @sonnyto#2019-10-0915:17murtaza52I have some enviroment variables that I am setting in my zshrc script. I am starting my clj project using clj-jack-in, however those variables are not available to the clj project. How do I make them available ?#2019-10-0916:19spfeifferSpacemacs keeps the active env variables in its own file. You need to update them there, too.#2019-10-0916:21spfeifferhttp://develop.spacemacs.org/doc/FAQ.html#common , answer 1.5#2019-10-1105:09murtaza52@U067P1FT2 thanks for pointing out#2019-10-0917:28Mario C.I am using two frames side by side and in one frame when I use SPC-w-c-c centered buffer mode on a window its makes the current frame the window is on move on top of the other frame. Is this expected behavior?#2019-10-0919:44cjsauerš all, following these instructions here: https://practicalli.github.io/spacemacs/refactor/within-a-project.html
I canāt quite seem to get this working. F3 opens the search results in a buffer for editing, but this buffer appears to be read-only, so I canāt make modifications via iedit :thinking_face:#2019-10-0919:45cjsauerRelated to this, helm-projectile-grep seems to be searching a lot of my compiled JS output, which bogs down the search buffer quite a bitā¦can I get it to honor .gitignore perhaps?#2019-10-0920:04zanespacemacs/search-project-auto, which is bound to SPC / in evil mode, should respect your .gitignore.#2019-10-0920:10cjsauerDid the trick, thank you š#2019-10-0920:15cjsauerAh okay, I found the solution. Those docs must be stale. Hereās what I did:
1. SPC /
2. Enter search query
3. Press C-c C-e to capture search results in an edit window
4. Make edits as needed (e.g. using iedit SPC s e on highlighted text)
5. Commit the changes with C-c C-c#2019-10-0921:38practicalli-johnnyF3 only saves the results in a buffer, you cannot use those results to make changes throughout the project.
F4 is the action you need to make the changes.
As you also found, rather than C-z followed by F4 you can use C-c C-e instead.
I am now thinking that using C-c C-e is a nicer practice, so will update that page in the book. I'll put the previous approach as an alternative#2019-10-0920:15cjsauer#2019-10-0922:11practicalli-johnny@cjsauer I've updated the docs to use C-c C-e rather than C-z followed by F4 as it seems a nicer approach and should prevent confusion between the actions F3 that only saves the results and F4 that allows for editing.#2019-10-1000:42cjsauer@jr0cket cool, thank you š. Awesome guide btw.#2019-10-1007:55practicalli-johnnyThanks for the feedback, it always helps to improve the guide#2019-10-1018:17theeternalpulseI updated my .emacs.d from develop and when I try SPC SPC I get the message Wrong type argument: listp, 10#2019-10-1018:18theeternalpulseAlso updated the packages when it started up#2019-10-1018:20practicalli-johnny@theeternalpulse did you update your .spacemacs file from the template, SPC f e D. Also recommend restarting Emacs after installing new packages#2019-10-1018:21theeternalpulseI restarted after updating, let me check the template, just remembered doing that a long time ago, been a while#2019-10-1018:22practicalli-johnnyIf itās been a while then itās most likely something new in the template is required. Copy all new settings from the template and restart Emacs#2019-10-1018:24practicalli-johnnyAlso take a look at SPC b m the message buffer to see if there are any warnings or errors#2019-10-1018:27theeternalpulseah, it seems to be calling ivy--height: Wrong type argument: listp, 10#2019-10-1018:37theeternalpulseI removed ivy and it works with the default helm, but seems it has an issue with enabling ivy#2019-10-1018:39practicalli-johnnyI assume you are using Ivy rather than Helm, if so then SPC SPC probably calls Ivy to display a pop up entering a command patter to narrow.
Do you have any custom code in.spacemacs related to Ivy#2019-10-1018:39practicalli-johnnyI assume you have to disable / remove helm to use Ivy as they are both trying to do the same actions in Spacemacs #2019-10-1018:41theeternalpulseI removed helm entry and replaced with ivy, until I updated it's been working, I also removed the setq's related to it and restarted, still have the issue, let me try to remove all the helm entries from the custom-settings#2019-10-1018:49practicalli-johnnyYou could just move your .spacemacs file and restart Spacemacs, then it will create a new .spacemacs file and it will prompt you as to if you want helm or Ivy. Then just copy over the layers. You should have something working okay then (or you have found a bug in Ivy)#2019-10-1018:51theeternalpulseI'll try that, I'm looking through the spacemacs code to see if anything there first since I have no problem on standard emacs using ivy#2019-10-1022:20theeternalpulseseems to have been related to (setq counsel-yank-pop-height 10) I had in there at some point#2019-10-1023:02theeternalpulsethank goodness for (debug) statements#2019-10-1215:32murtaza52Below is my deps.edn -
{:paths ["resources" "src"]
:deps {org.clojure/clojure {:mvn/version "1.10.1"}
ring/ring-defaults {:mvn/version "0.3.2"}
compojure {:mvn/version "1.6.1"}}
:aliases
{:test {:extra-paths ["test"]
:extra-deps {org.clojure/test.check {:mvn/version "0.10.0"}}}
:runner
{:extra-deps {com.cognitect/test-runner
{:git/url ""
:sha "76568540e7f40268ad2b646110f237a60295fa3c"}}
:main-opts ["-m" "cognitect.test-runner"
"-d" "test"]}}}
The test.check dep is specified in the :test alias, however I want to make to available on the repl during development. When I start cider using SPC m ', the dep is not included.#2019-10-1222:31practicalli-johnny@murtaza52 this article should give you the answer. Either use SPC u before the command to start the REPL, or create a .dir-local.el file.
http://jr0cket.co.uk/2019/07/CIDER-jack-in-to-Clojure-CLI-projects-from-Spacemacs.html
If you upgrade to latest Cider, published a couple of days ago, they may let you select also (havenāt looked into this yet)#2019-10-1408:07murtaza52@jr0cket thanks, that solved the problem. Even my test ns were not being picked up bcoz it was not on the path. I had to manually evaluate each ns before !#2019-10-1414:10practicalli-johnnyI added a short section on using Multiple Cursors, now its included by default when installing the develop branch.
https://practicalli.github.io/spacemacs/editing/evil-tools/multiple-cursors.html
I am interested how people are using multiple cursors, especially as you can call Emacs functions / commands on the cursors, so you can do more than simple editing. Thanks.#2019-10-1415:39spfeifferI never used it and rarely see a usecase for me.#2019-10-1415:47practicalli-johnny@U067P1FT2 do you use iedit instead?
If you do not use iedit either, how do you do search and replace?#2019-10-1417:02agI use combination of both mc-evil and iedit and narrowing.
usually what I would do is:
- narrow to a region or fn SPC n r SPC n f
- then using mc-evil or iEdit do the changes. Most of the time I use iEdit, but sometimes it can be limiting since it doesnāt give you an easy way to āskipā things you donāt want to change#2019-10-1418:23theeternalpulseFunny I just installed evil-mc. I like it's though it's a bit too modal with the pause-resume feature. Most of the time I use iedit since I need to manipulate multiple of the same thing. I always wish for good multiple-cursors when doing things like making mocked data by hand or something less code centric.#2019-10-1420:34spfeiffer@jr0cket Well, i use the regular vi or emacs style search-and-replace in the file or project.#2019-10-1423:10theeternalpulsea good addition I think would be good for evil-mc would be to automatically pause when adding cursors and automatically resume when doing something like insert#2019-10-1423:10theeternalpulseI'll probably do it on my own config#2019-10-1618:00gzmaskYAML support sucks⦠can I have vertical indention alignment lines?#2019-10-1618:01agspacemacs/toggle-indent-guide (SPC t i)#2019-10-1811:19practicalli-johnnyI don't recommend updating packages (from Melpa) at the moment.
I am getting several bad-signature errors when updating packages today, specifically the flycheck-package package. I downloaded that manually from another laptop and am now getting the same error with package-lint.
Its not stopping me working, so will try again over the weekend and see if its fixed itself.#2019-10-2002:55didibusUpdating my Emacs version to the latest fixed it for me.#2019-10-2002:56didibusI also updated gpg2, not sure if that did anything though. On its own, it hadn't fixed it.#2019-10-1814:00Alexander Heldthi, im on a mac and im having trouble copying from a buffer to the system clipboard. should it ājust workā or do i have to define something?#2019-10-1814:00Alexander Heldti tried "+y and "*y and im used to in vim, but it does not work#2019-10-1816:55ag@me1243 try adding osx layer#2019-10-1816:56Alexander Heldt@ag thanks, ill do that!#2019-10-2108:16Alexander Heldti noticed spacemacs has a develop-branch that is 3k commits before master (and like 300 after). should i use develop instead of master?#2019-10-2108:27spfeifferYes yes yes!#2019-10-2108:27spfeifferDisregard the master branch.#2019-10-2108:27spfeifferAs sad as it isā¦#2019-10-2108:28spfeifferdevelop is fine and mostly stable.#2019-10-2108:40Alexander Heldtok cool, thanks!#2019-10-2417:51Drew VerleeCan anyone think of a reason why messages wouldn't show up in my list of buffers? I can summon it via SPC w p m, but SPAC b b 's list doesn't show it.#2019-10-2418:02agperhaps because youāre in a separate layout. use SPC b B#2019-10-2418:06Drew Verleeerr yes. That shows it. Can you explain the relationship between layouts and buffers or point me to something š.
I had assumed if i was in a layout it would show any related buffers.#2019-10-2418:10agif you are in a different from Default layout, SPC b b shows buffers local to that layout. If you want any selected buffer to be part of the current layout you can always add it SPC l a#2019-10-2913:38practicalli-johnnyIt seems that http://develop.spacemacs.org website (the website for those using the develop branch of Spacemacs) is a little behind, last update was 8th July 2019. There is a bot that manages (at least some of) the deployment process and has a website at https://emacspace.github.io/develop.spacemacs.org/
That site was build on the 15th September, so also a little behind. So the most up to date source of info is in the https://github.com/syl20bnr/spacemacs/ repository readme files#2019-10-2914:06practicalli-johnnyJoker is now an optional part of the Spacemacs Clojure layer, via https://github.com/syl20bnr/spacemacs/pull/12688
You can now have multiple linters running (you need to install their binaries first of course). So you could have clj-kondo and joker running together if you wish.
https://github.com/syl20bnr/spacemacs/tree/develop/layers/%2Blang/clojure#enabling-automatic-linting
I find clj-kondo works well enough by itself, so dont agree with the recommendation to use both, but there are a few edge cases that Joker may still catch that clj-kondo does not.
From discussions in #emacs channel it seems you may experience duplicate linter warnings if you run both linters together.
I am very interested to hear which linters we are all using. Thanks#2019-10-2914:08borkdudefwiw I have this joker wrapper script on my machine:
#!/usr/bin/env bash
## turn off some joker features, so I can test clj-kondo better
/usr/local/bin/joker "
It suppresses a bunch of warnings and adds (joker) to the end, so I see the error is coming from joker. Sometimes it reminds me of something I still need to implement (but it doesn't happen that often anymore).#2019-10-2914:08borkdudebut this is mostly for myself/developing kondo#2019-10-2914:09borkdudeif you're missing something that's in joker but not in kondo, lemme know#2019-10-2916:17practicalli-johnnyI havent missed using Joker in the last few months, hence my curiosity as to if others are still using it or using both clj-kondo and joker. I've not heard from anyone using squiggly/eastwood yet either.#2019-10-3117:19johanatanhi, i'd like to bind the key K in evil mode to be equivalent to the key sequence: k J. what's the easy way to accomplish that?#2019-10-3117:20johanatan[this completes the symmetry: J:j::K:k]#2019-10-3118:02Jcaw@johanatan Would you like to bind to the target of k J directly or do you want it to emulate the keypress?#2019-10-3118:07JcawYou can bind sequences with (spacemacs/set-leader-keys <key> <mapping> [<key> <mapping>...])
(spacemacs/set-leader-keys
"a" some-command)
(spacemacs/set-leader-keys
"b" another-command
"c" third-command)
#2019-10-3118:10JcawIf you want to emulate a keypress, you can actually pass (kbd <sequence>) as the target command, and it will be treated as a keyboard macro which emulates that keypress. So for example:
(spacemacs/set-leader-keys
"K" (kbd "SPC k J"))
(This is probably not the correct key sequence.)#2019-10-3118:11JcawThere are other macros for mode-specific bindings. Three total:
spacemacs/set-leader-keys
spacemacs/set-leader-keys-for-minor-mode
spacemacs/set-leader-keys-for-major-mode
#2019-10-3120:43johanatan@jack.crawley92 i think emulating the keypress is fine. but is there no way to create an independent key binding without making it a "leader key". I think "leader key" in this context is a bit off the mark as a) there are no follower keys and b) we are talking about editing text in evil mode (vim commands do not require a "SPC X ..." prefix-- e.g., to "join" the current line with the next one you simply press the single key "J". I want to do the same for the single key "K" to join the current line onto the previous line.#2019-10-3120:46JcawYou could certainly bind it to the evil mode map too - treating it as a macro is default Emacs behaviour, it's not handled by the spacemacs macro#2019-10-3120:46Jcaw(define-key evil-<state>-state-map (kbd "K") (kbd "k J"))#2019-10-3120:47JcawI use Emacs mode, so I don't know the evil states off the top of my head.#2019-10-3120:48JcawIn general I think emulating is smelly code, but I use it in my config in a few places.#2019-10-3120:52JcawI think there's another macro (might be a function), evil-define-key, which acts on the edit state by default - not sure though.#2019-10-3121:04johanatan@jack.crawley92 perfect! thank you#2019-10-3121:04JcawNo worries! : )#2019-10-3121:06johanatanundo doesn't quite understand it tho. any ideas how to rectify that?#2019-10-3121:07johanatani.e., after pressing "K" and then "u" the cursor is left on the top line instead of the bottom one#2019-10-3121:10JcawAh, keyboard macros execute each step as an atomic command. It's probably doing that.#2019-10-3121:11JcawIn that case I wouldn't emulate - wrap the two commands you want to run in another command#2019-10-3121:11johanatanok, makes sense#2019-10-3121:12Jcaw(defun join-to-previous (&optional prefix-arg)
(interactive "P")
(first-command prefix-arg)
(second-command prefix-arg))
#2019-10-3121:12JcawYou might have to call the individual commands interactively for them to behave properly.#2019-10-3121:13johanatanwhat's the "P" argument to "interactive" ?#2019-10-3121:14JcawIt defines the type of prefix argument the command demands. In this case you probably actually want lowercase "p" - that's the numeric prefix argument.#2019-10-3121:15JcawIt's a pretty obtuse interface to be honest, I don't like it#2019-10-3121:15Jcawhttps://www.gnu.org/software/emacs/manual/html_node/elisp/Interactive-Codes.html#Interactive-Codes#2019-10-3121:15johanatanoh, that's right. i never pass a prefix to "J" so didn't think of that#2019-10-3121:16JcawI actually don't even know if the evil commands take prefix arguments, just assuming. š#2019-10-3121:16johanatanyea, it does. i just tried it#2019-10-3121:16JcawNice š#2019-11-0117:09johanatan@jack.crawley92 this is what i came up with:
(defun join-to-previous (prefix)
(interactive "p")
(save-excursion
(evil-previous-line prefix)
(dotimes (var prefix)
(join-line 1))))
(define-key evil-normal-state-map (kbd "K") 'join-to-previous)
#2019-11-0117:09johanatanthis preserves undo semantics#2019-11-0117:27JcawLooks good#2019-11-0117:27JcawOh - convention for custom defuns is to use my- or your username (or a contraction of it) as the prefix, to avoid potential namespace clashes.#2019-11-0118:19johanatanweirdly, calling (evil-join (- (line-number-at-pos) prefix) (line-number-at-pos)) did not work. it joined lines 14 and 15 even though i was at like line 447 in the file.#2019-11-0118:19johanatanhence my inlining of the evil-join guts there#2019-11-0118:59Jcawevil-join probably takes point position, not line number#2019-11-0118:59JcawYep, looking at the source it seems to.#2019-11-0119:00johanatanah#2019-11-0119:01johanatanwell that's a bummer#2019-11-0119:02JcawYeah, looks like a restriction of the macro used to define evil commands. Does seem a bit opaque.#2019-11-0119:02johanatanbut my code above is fine. no need to over optimise this#2019-11-0119:03JcawYep. And internally, it uses the same method you did:
(evil-define-operator evil-join (beg end)
"Join the selected lines."
:motion evil-line
(let ((count (count-lines beg end)))
(when (> count 1)
(setq count (1- count)))
(goto-char beg)
(dotimes (var count)
(join-line 1))))
#2019-11-0119:03johanatanyea, that's where i got my code from lol#2019-11-0119:03JcawHaha#2019-11-0119:03JcawWelp#2019-11-0303:37euccastrois there any way to upgrade the cider package without upgrading everything else? my spacemacs installation breaks if I try a full package upgrade#2019-11-0304:55euccastrohm nevermind, upgrading to emacs 26.3 fixed my problems#2019-11-0313:24JcawFor future reference, you can remove the package and restart - M-x package-delete. Spacemacs will install a new version of the package on boot.#2019-11-0313:24JcawTheoretically you should be able to use M-x package-reinstall, but in practice it's unreliable, so just clear it out and let Spacemacs handle the re-download.#2019-11-0320:27practicalli-johnny@euccastro if you do find a package that you don't want to upgrade, you can always add it to dotspacemacs-frozen-packages#2019-11-0400:16euccastrothanks to both!#2019-11-0410:51kirill.salykinHi all,
after latest update of spacemacs (develop branch) I see this error:
Error in dotspacemacs/user-config: Symbol's value as variable is void: counsel-find-file-map
Any ideas whats wrong and how i can fix it?#2019-11-0411:19kirill.salykinSeems not related to initialization time
There is no Backtrace buffer#2019-11-0411:32kirill.salykinthis commit breaks everything:
https://github.com/syl20bnr/spacemacs/commit/383da46e38712ef6d08ef3e1e96d418bdf2182db#2019-11-0415:49practicalli-johnnySPC f e D to update your .spacemacs file ?? Maybe something has been added, changed.#2019-11-0415:51practicalli-johnnyOr perhaps take a copy of .spacemacs and delete the contents of dotspacemacs/user-config. Perhaps something you added there is conflicting.#2019-11-0415:51kirill.salykinI think it is because Iāve excluded counsil and friends (via excluded packages)#2019-11-0415:52kirill.salykinand this commit broke it#2019-11-0416:19kirill.salykindo you think it is bad idea to explicitly exclude counsil?#2019-11-0418:09practicalli-johnnyIf you are using Ivy, then Counsel seems to be important to the Spacemacs setup (not tried Ivy in depth myself though)#2019-11-0418:15practicalli-johnnyIs there a reason to exclude counsel and other packages? If you are not using them then they wont be loaded. If you are not using a layer that doesnt use (need) them, then removing that layer would be more appropriate.#2019-11-0418:15practicalli-johnnyI am afraid I dont know why you excluded packages, so am only guessing.#2019-11-0506:56kirill.salykinI am not using Ivy, honestly saying I dont remember why I excluded them
You are right, there is no need to exlclude them
Thanks for advices!#2019-11-0506:57kirill.salykinIāll start later with fresh new .spacemacs file, thanks for the idea as well#2019-11-0809:47kirill.salykinOk, the error caused by lispyville-set-key-theme
but it is strange, because lispyville doesnt use counsil#2019-11-0810:05kirill.salykinhttps://github.com/syl20bnr/spacemacs/issues/12894#2019-11-0618:10Drew VerleeWhats the solution for overriding defaults on a per project basis?#2019-11-0620:37zanePerhaps this? https://endlessparentheses.com/a-quick-guide-to-directory-local-variables.html#2019-11-0623:08Drew Verleethanks#2019-11-0718:40zaneYouāre welcome!#2019-11-0623:11Drew VerleeHow do you do custom clojure formatting? like if i wanted to align reader conditional values.#2019-11-0700:23Drew VerleeI also find the "space /" command to contanstly break and pick up files that are on the gitignore. i have messed with it in the past and if there is some trick to getting it to work then it would be nice if it were clear to me. for now im using rgrep#2019-11-0718:19aisamuHaven't seen such issues with ripgrep (on spacemacs' develop branch, though)#2019-11-0817:12Drew Verleedo you mean rgrep i dont see a ripgrep command#2019-11-0818:08aisamuripgrep is usually shortened to rg, so I suspect these are two different things
If you're running spacemacs develop, make sure you have something like this on your dotfile
dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep")
(and make sure rg is available on your system - it's on homebrew and nix!)#2019-11-0818:09aisamuIt's stupid fast, you won't regret it!#2019-11-1200:02Drew VerleeIll take a look, thanks!#2019-11-0714:02Jcaw@dnewberry The smart search commands can be a bit loopy#2019-11-0714:03JcawSimplest solution is probably to outsource it to git grep by default. Here's an example diff:
https://github.com/Domon/dotfiles/commit/f2e0459f5705dceeb56b15a5d01f63162c792679#2019-11-0715:44Mario C.does the spacemacs config file live in the .emacs.d directory?#2019-11-0715:47jumar@UB0S1GF47 that's in your home directory (`~/.spacemacs`)#2019-11-0715:47Mario C.Yes I just found it lol thanks#2019-11-0715:44Mario C.If so where?#2019-11-0715:45Mario C.The file the command spc-f-e-d brings up#2019-11-0718:18aisamuJust FYI, SPC f y y prints the file path for the buffer under focus (and SPC f y Y prints the relative-to-project-root path)#2019-11-0717:06Mario C.I am getting Error running timer 'org-indent-initialize-agent': (void-function org-time-add)#2019-11-0811:14practicalli-johnnyI was getting this error after updating to the latest packages, which I believe included Spacemacs org related packages.
I simply restarted Emacs, SPC q r and the error went away š#2019-11-0815:37Mario C.My error doesn't go away unless I remove the org package#2019-11-0817:36practicalli-johnnyI installed a completely new set of packages, as I changed to Emacs version 26.3.
If you need the org package, then try moving all the existing packages in .emaca.d/elpa (or just delete them). Then restart Emacs#2019-11-0718:18aisamuJust FYI, SPC f y y prints the file path for the buffer under focus (and SPC f y Y prints the relative-to-project-root path)#2019-11-0718:19aisamuHaven't seen such issues with ripgrep (on spacemacs' develop branch, though)#2019-11-0811:14practicalli-johnnyI was getting this error after updating to the latest packages, which I believe included Spacemacs org related packages.
I simply restarted Emacs, SPC q r and the error went away š#2019-11-1019:26murtaza52Is there a way to see the markdown rendered locally ? I am writing a github readme.md file, and would like to preview it locally before pushing to github.#2019-11-1109:31practicalli-johnnySpacemacs specific info for viewing markdown in the Emacs browser and config for GitHub specific rendering
https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/markdown#configuration#2019-11-1020:19Jcaw@murtaza52 I use grip which offloads it to the browser. https://github.com/joeyespo/grip#2019-11-1020:22JcawThere's also markdown-mode which can do it in Emacs. Guide here (haven't used it myself):#2019-11-1020:22Jcawhttps://leanpub.com/markdown-mode/read#leanpub-auto-live-preview-mode#2019-11-1109:31practicalli-johnnySpacemacs specific info for viewing markdown in the Emacs browser and config for GitHub specific rendering
https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/markdown#configuration#2019-11-1109:35practicalli-johnnyI've never felt the need for a live preview for single pages, as the markdown mode syntax highlighting gives a very accurate representation of what the page will look like.
I use cryogen for static websites, it has a local server that shows the pages generated from markdown.#2019-11-1117:53Mario C.I guess this is more of a vim question but I'd like to be able to interactively search and replace where the replace is dynamic based on the match. Is this possible out of the box in vim?#2019-11-1117:53Mario C.Say I want to turn all 1's into 7's and all 2's into 8's so on and so forth#2019-11-1118:21practicalli-johnnySPC n + increases numbers.
I have no idea how to select all numbers unless perhaps you can used multiple-cursors (but this may be more effort than its worth if there is no structure to the number locations). Not sure if this helps at all...#2019-11-1119:03Mario C.Interesting. I didn't know I could do that but its helpful thanks#2019-11-1218:59theeternalpulseafter an update the ususal Ctrl-P/N no longer work for popping previous and next after pasting, in evil mode#2019-11-1221:21practicalli-johnnyHas that option been reset to nilā (the default I believe) in your .spacemacs` file. If itās nil, then set it to t. If true, then you have found a bug it seems.#2019-11-1221:32theeternalpulsewhat option is that?#2019-11-1221:32theeternalpulsethe paste-transient-state?#2019-11-1221:32theeternalpulsethe feature i'm talking about should be an emacs standard command#2019-11-1223:22practicalli-johnnySorry, my bad, I didnāt read properly. Iāve never used C-P/N before.#2019-11-1223:50theeternalpulseah, it's similar but doesn't give the hydra state, it just cycles through previous and next copied items to paste#2019-11-1220:16johanatananybody know how to troubleshoot the following error?#2019-11-1221:23practicalli-johnnyIf you are on a Mac I think some people had this issue several weeks ago. Sorry, I donāt remember the fix, but will see if I can find anything#2019-11-1221:25practicalli-johnnyIf itās an option for you, could you upgrade Emacs to version 26.3?#2019-11-1221:29practicalli-johnnyFYI. I assume most people on this channel use the Spacemacs develop branch, rather than the 2 year old master branch.#2019-11-1221:41johanatanYea I tried develop too but there were different issues #2019-11-1221:41johanatanIāll try upgrading to 26.3#2019-11-1300:39johanatanthat didn't fix it. and now emacs itself seems unstable/locks up easilly.#2019-11-1300:40johanatandoesn't work at all on develop branch, but on master i can still get it to start albeit unstably#2019-11-1300:40johanatando you happen to remember if there were more to the fix than merely upgrading emacs?#2019-11-1412:15practicalli-johnnyThere is info on the flycheck page about setting your path if you have a Mac, so make flycheck work
https://www.flycheck.org/en/latest/
Also take a look at the troubleshooting section and verify flycheck is working
https://www.flycheck.org/en/latest/user/troubleshooting.html
I don't have a Mac, so can't test this.#2019-11-1412:19practicalli-johnnyIf it is a path issue, flycheck may work if you run Emacs from a terminal window#2019-11-1220:16johanatan#2019-11-1220:17johanatani have followed the instructions found here: https://github.com/borkdude/clj-kondo/blob/master/doc/editor-integration.md#spacemacs for master to a T .#2019-11-1220:17johanatanif i run global-flycheck-mode, it actually disables it. run it again to re-enable, then i get the same error saying that flycheck is disabled.#2019-11-1220:18johanatanif i do SPC u M-x flycheck-disable-checker, it says that no checkers are disabled for this file.#2019-11-1309:12kirill.salykingoodmorning
my spacemacs sometimes freezes (need to force quit)
how I can debug it?#2019-11-1406:45practicalli-johnny@kirill.salykin Info about debugging Spacemacs on the debugging page of their wiki https://github.com/syl20bnr/spacemacs/wiki/Debugging#2019-11-1406:47practicalli-johnnyItās probably due to a package, so you could also remove all none-essential packages to run Spacemacs and slowly add back additional packages you use.#2019-11-1406:56kirill.salykinthanks, will go that way#2019-11-1503:56lvhOK, I have an annoying problem in Spacemacs where autocomplete works if I give it a namespace-aliased symbol and one letter, but not otherwise, so, with | the cursor:
- m/ <TAB> has no matches
- m/h <TAB> does
Also, the m isn't highlighted until I add the h, which tells me maybe it's CIDER that doesn't know what it is yet? On the other hand, if I manually M-x company-complete it absolutely knows what to do... this is on develop, Spacemacs v.0.300.0.
(auto-completion :variables
auto-completion-return-key-behavior 'complete
auto-completion-tab-key-behavior 'cycle
auto-completion-idle-delay 0.1
auto-completion-enable-snippets-in-popup t
auto-completion-enable-help-tooltip t
auto-completion-enable-sort-by-usage t)
#2019-11-1512:08practicalli-johnny@lvh I have always assumed auto-complete didnt start until you type 2 characters or more. That is what I am used to. Perhaps that is just the auto-complete popup that does that... I will check.#2019-11-1512:19practicalli-johnnyHmm, TAB does work for completion for me, possibly because I am using Evil rather than Holy. M-/ works though. I am getting completion using that or company-complete but only on functions I evaluated already. I will try some experiments as I continue coding today.#2019-11-1515:37practicalli-johnnyDo you also find the evaluation indicators in the fringe a little too subtle? If you are not sure what I mean, then perhaps you do. When you evaluate an expression then a green mark appears in the left hand fringe next to that expression. This indicates that the code is evaluated in the current repl. when you change the code, the mark is automatically removed.
I raised an issue to make these indicators a bit less subtle. What do you think?
https://github.com/clojure-emacs/cider/issues/2748#2019-11-1518:34spfeifferIndeed, i never noticed them or know about themā¦#2019-11-1520:29practicalli-johnnyThe evaluation marks do stop me having those moments when a I wonder why the code isnāt working and I realised I forgot to evaluate a change š±#2019-11-1520:31practicalli-johnnyYou can quickly customise the colour of the mark... see the first comment on the issue.#2019-11-1713:47cjsauerWhoa...Iāve also never noticed those. Thatās good to know. #2019-11-1716:00practicalli-johnnyI am considering a change to the spacemacs-light/dark themes to make them a little more noticeable. I dont yet understand where the bitmap for the indicators come from. I would like something more like the git fringe indicators. You can easily switch off the fringes if they are annoying you š#2019-11-1716:40JcawThe colors are hard-coded by cider, so contrast will be inconsistent between themes.
(defface cider-fringe-good-face
'((((class color) (background light)) :foreground "lightgreen")
(((class color) (background dark)) :foreground "darkgreen"))
"Face used on the fringe indicator for successful evaluation."
:group 'cider)
Would probably be better to inherit from the diff face or something.#2019-11-1716:44JcawThe bitmap appears to be the inbuilt empty-line fringe bitmap. You can check with (fringe-bitmaps-at-pos (point))#2019-11-1716:44JcawDocumentation here:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Fringe-Bitmaps.html#Fringe-Bitmaps#2019-11-1716:46JcawIt seems to be a property added to the fringe, in this method:
(defconst cider--fringe-overlay-good
(propertize " " 'display '(left-fringe empty-line cider-fringe-good-face))
"The before-string property that adds a green indicator on the fringe.")
The process seems to be: add a space to the fringe, propertized with this bitmap.#2019-11-1716:53JcawJust tested. Modifying empty-line there works.#2019-11-1716:54JcawNow have a red curly arrow evaluation indicator, looks gross lol#2019-11-1716:55practicalli-johnnyThanks this is really helpful. I did change the colour via the spacemacs.common.el theme file, but its changing the bitmap I think makes more of a difference.#2019-11-1716:58JcawNo worries. I'll extract the colors only and put together a PR. Didn't realise spacemacs-theme also overrides the face.#2019-11-1716:59practicalli-johnnyAt line 265 of spacemacs-comon.el I added as a test the following code... `(cider-fringe-good-face ((,class (:foreground ,darkpurple))))
#2019-11-1717:00practicalli-johnnyPR's are awesome.... did you find a nice bitmap to use? Is it possible to use a solid line rather than the empty-line bitmap?#2019-11-1717:02JcawI had a look through a few, nothing that I prefer yet. There is a vertical rectangle, but it doesn't fill the frame.#2019-11-1717:02JcawMight be possible to bypass the bitmap and just fill the background. Let me try in fact...#2019-11-1717:02JcawYep, that works.#2019-11-1717:03Jcaw(set-face-attribute 'cider-fringe-good-face nil :foreground "red" :background "red")#2019-11-1717:04Jcaw#2019-11-1717:05JcawProbably a better approach in this case would be to dispense with the bitmap and just adjust the background, but it might distort on large fringes. Not sure what setups people use.#2019-11-1717:06practicalli-johnnyspacemacs defaults to 8 px and there is a fringe-mode to set it to half size. I would be surprised if anyone used more than 16#2019-11-1717:12JcawInheriting from diff-added is nice#2019-11-1717:13Jcaw#2019-11-1717:14JcawCan't alter the background without introducing extra logic#2019-11-1717:14JcawThe logic might not generalise to all themes#2019-11-1717:15practicalli-johnnywonder if we could have a cider layer option that would allow you to choose your bitmap?#2019-11-1717:16JcawI was thinking about that. I don't know what Cider's philosophy is on adding extra toggles#2019-11-1717:17Jcawfilled-rectangle, inheriting face from diff-added#2019-11-1717:19practicalli-johnnyinitial feedback from cider team was it should be a theme configuration#2019-11-1717:19practicalli-johnnyI like the last image... filled-rectangle#2019-11-1717:21JcawMe too. It's a lot clearer, still seems mostly unobtrusive.#2019-11-1717:22JcawIf inheriting, some themes have less green diff faces. Zenburn:#2019-11-1717:23JcawAnd some will have more complex faces. Leuven:#2019-11-1717:25JcawProbably worth throwing these up on the GitHub issue#2019-11-1717:25JcawI'll do that in a bit#2019-11-1717:26practicalli-johnnyYes, if you can add them to https://github.com/clojure-emacs/cider/issues/2748 that would be great#2019-11-1717:58JcawOk - putting it all together now.#2019-11-1802:07JcawJust got back to it - took some fresh screenshots and opened a PR#2019-11-1821:37johanatandoes anybody know what is supposed to provide the automatic ns declaration on open of empty file of .clj or .cljs extension?#2019-11-1821:37johanatanthat used to work for me but now it doesn't#2019-11-1908:49practicalli-johnny@johanatan clj-refactor adds the ns declaration when creating a new file. This package is now optional in the Spacemacs Clojure layer
https://develop.spacemacs.org/layers/+lang/clojure/README.html#enabling-sayid-or-clj-refactor
Eventually all the useful functions in clj-refactor will be put into clojure-mode #2019-11-2005:21johanatan@jr0cket cool, thx. How is it going to be determined what parts of clj-refactor are āusefulā?#2019-11-2009:40practicalli-johnny@johanatan The features that go from clj-refactor to clojure-mode will be decided by whoever does the pull requests and has them approved by the CIDER team.
Happy to discuss here what would be useful. It could be a good way to learn some elisp...#2019-11-2108:22Karol WójcikDoes anyone experience the issue which causes the $ to move to the end line (which is the last paren)?
1L (some-call) <-- here the cursor goes while it should be on (some call)_HERE
Previously $ was moving the cursor to the 1 character after the last sign on the line.#2019-11-2110:37practicalli-johnny@karol.wojcik In Evil normal state, by default the cursor (point) stops on top of the last character in the line. So in Clojure the cursor is sat on top of the last paren.
I believe there is an Emacs package that can be added to change this behaviour, but don't recall its name, sorry.
You don't need to be at the end of a line to evaluate the whole expression in Evil normal state, , e f will evaluate the top level of the current expression regardless of where in that expression the cursor is.
Or you can go to the next line after the expression and use , e e.
, e ; will also evaluate the top level of the current expression, just like , e f and return the result as a comment.#2019-11-2111:05kszaboIt would be nice if there was a command to send in the form what you are on, essentially the closest parent node.#2019-11-2111:06kszabo(boom (inc 1))#2019-11-2111:06kszaboso that if my cursor is anywhere on (inc 1) (closing/opening parens included) it would return 2#2019-11-2111:32kszabo, e v is the closest thing, you can stand on the beginning of the form ( to eval the whole sexp#2019-11-2111:20Karol Wójcik@jr0cket But wait before it was working the way I described. Hmm maybe because of the package you mentioned.
Now , e e does not make sense in Clojure ;/ if used in conjuction with evil-mode#2019-11-2111:32practicalli-johnnyI find , e e to evaluate the previous expression very useful. I use it all the time. It's also useful within a nested expression where I just want to understand that part. As mentioned I also use , e f and , e ; and of course the excellent Cider debugger, , d b quite a lot too...
I appreciate you may be used to a different pattern of operation and that change can be hard to change. There are many other commands I haven't really used in Cider.#2019-11-2111:32kszabo, e v is the closest thing, you can stand on the beginning of the form ( to eval the whole sexp#2019-11-2115:02Karol Wójcik@jr0cket That's an answer! Thanks for help!#2019-11-2115:09practicalli-johnnyAh, that was it. Yes, never used that as to me it just breaks the way I use Evil.#2019-11-2118:35johanatananybody else seeing flycheck-clj-kondo errors when displayed as tooltip missing trailing chars?#2019-11-2118:35johanatan#2019-11-2119:35Karol WójcikNot related, but what's the name of the theme?#2019-11-2119:36johanatanItās just the default spacemacs one #2019-11-2216:34practicalli-johnny@johanatan I am not seeing clj-kondo messages cut off in either spacemacs light or dark themes. I installed Spacemacs from scratch this week, so everything is pretty new. clj-kondo binary is v2019.10.11-alpha#2019-11-2300:50practicalli-johnnyI just updated clj-kondo binary to v2019.11.07 and the styling has changed, giving a much bigger space around the error message. Perhaps give that version a try.#2019-11-2301:33johanatanhmm, you think the actual clj-kondo binary has much to do with that? i'd imagine that flycheck is just scraping error messages due to a specified format. unlikely that that format has changed with a recent version of clj-kondo#2019-11-2301:33johanatan@jr0cket ^#2019-11-2409:11practicalli-johnnyIt believe itās the only thing I changed. I will try it on my other machine and see what happens. It could be a different version of Emacs and I just didnāt notice the change until after upgrading clj-Kondo.#2019-11-2410:34borkdudeNothing has changed in clj-kondo's output format. Clj-kondo does not do any "styling", it's just row and col number + text#2019-11-2517:42johanatanThat's what I figured. Do you have any idea what could be going on with that last char being truncated then?#2019-11-2517:42borkdudeNo clue#2019-11-2517:43borkdudeMaybe try a vanilla install and re-introduce pieces piece by piece?#2019-11-2519:00johanatanYea weird thing is that this is a complete fresh reinstall since other stuff got screwed up. Of course my .spacemacs file is still almost full. I will try that thanks!#2019-11-2422:13practicalli-johnnyMy bad, I think I must have changed the styling by accident when I was experimenting with faces to make the evaluation marks in Cider more visible.#2019-11-2614:31Andrea Imparatohello, anybody here uses sayid on spacemacs?#2019-11-2614:32Andrea ImparatoI have no idea why but when I do (sayid-get-workspace) the buffer is empty š#2019-11-2614:33Andrea Imparato(iām trying to use it to debug tests)#2019-11-2614:44Andrea Imparatothe error i get on *Messages* is: sayid-find-existing-file: Wrong type argument: stringp, nil#2019-11-2615:11bpiel@imparato.andrea Evaling the buffer first can sometimes fix the latter issue#2019-11-2615:20Andrea Imparatoi did that š#2019-11-2615:22Andrea Imparatoit seems like that the workspace buffer is āstuckā#2019-11-2615:33practicalli-johnnyI've only used the cider-debugger which works nicely for specific functions. sayid looks really powerful, but havent had chance to make use of it yet.#2019-11-2615:36bpiel@imparato.andrea maybe you've capture too much? Do you get a timeout when it tries to render the *sayid* buffer?#2019-11-2615:37Andrea Imparatoi think i found the problem:
java.lang.NullPointerException: null
at clojure.lang.Compiler.maybeResolveIn (Compiler.java:7309)
clojure.core$ns_resolve.invokeStatic (core.clj:4336)
clojure.core$ns_resolve.invokeStatic (core.clj:4325)
clojure.core$resolve.invokeStatic (core.clj:4338)
clojure.core$resolve.invoke (core.clj:4338)
com.billpiel.sayid.trace$untrace_var_STAR_.invokeStatic (trace.clj:155)
com.billpiel.sayid.trace$untrace_var_STAR_.invoke (trace.clj:151)
com.billpiel.sayid.inner_trace3$eval7971$fn__7972.invoke (inner_trace3.clj:795)
clojure.lang.MultiFn.invoke (MultiFn.java:233)
clojure.lang.AFn.applyToHelper (AFn.java:156)
clojure.lang.AFn.applyTo (AFn.java:144)
clojure.core$apply.invokeStatic (core.clj:657)
clojure.core$apply.invoke (core.clj:652)
com.billpiel.sayid.workspace$disable_all_traces_BANG_.invokeStatic (workspace.clj:114)
com.billpiel.sayid.workspace$disable_all_traces_BANG_.invoke (workspace.clj:107)
com.billpiel.sayid.workspace$disable_all_traces_BANG_.invokeStatic (workspace.clj:108)
com.billpiel.sayid.workspace$disable_all_traces_BANG_.invoke (workspace.clj:107)
clojure.lang.Var.invoke (Var.java:381)
#2019-11-2615:37bpielš±#2019-11-2615:38bpieloh... you tried to use inner trace?#2019-11-2615:38bpielI don't use it. It can blow up#2019-11-2615:39bpielI should remove it#2019-11-2615:39bpielI should do a lot of things though......... š#2019-11-2615:39Andrea Imparatoi was just following the sayid README#2019-11-2615:39bpielfair#2019-11-2615:40bpielThe example in the README worked at some point#2019-11-2615:40bpielbut in general, the inner trace feature is not safe#2019-11-2615:40Andrea Imparatook#2019-11-2615:41Andrea Imparatogood to know š#2019-11-2615:41bpielha agreed#2019-11-2615:43Andrea Imparatook so this is how spacemacs starts the repl#2019-11-2615:43Andrea Imparato[nREPL] Starting server via /usr/local/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :plugins conj \[com.billpiel/sayid\ \"0.0.18\"\] -- update-in :plugins conj \[refactor-nrepl\ \"2.5.0-SNAPSHOT\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.23.0-SNAPSHOT\"\] -- repl :headless :host localhost
#2019-11-2615:43Andrea Imparatoafter that i switch the repl to the buffer namespace#2019-11-2615:43Andrea Imparatoand load the buffer#2019-11-2615:43Andrea Imparatothen i load the namespace on sayid (sayid-trace-ns-by-pattern)#2019-11-2615:44Andrea Imparatoi get
Traced namespaces:
15 / 15 *name_of_the_namespace*
6 / 6 *name_of_the_namespace*
0 / 0 *name_of_the_namespace*
#2019-11-2615:44Andrea Imparatoand the (sayid-get-workspace) and it hangs#2019-11-2615:44Andrea Imparatoš¢#2019-11-2615:45bpielhmmmm.... seems like you didn't do anything that would capture data#2019-11-2615:45bpielmeaning... given those steps, I would expect an empty **sayid** buffer#2019-11-2615:45Andrea Imparatodo i need to execute functions on the repl?#2019-11-2615:46bpielyes. If you were to execute name-of-ns/name-of-fn#2019-11-2615:46bpielthen do (sayid-get-workspace)#2019-11-2615:46bpielyou should see something#2019-11-2615:47Andrea Imparatofunny enough, same configs, same emacs on different laptop and it works#2019-11-2615:47Andrea Imparatodifferent project tho#2019-11-2615:47Andrea Imparatocould be that is the project the problem#2019-11-2615:48Andrea Imparatoproblem, project is not mine š#2019-11-2615:48bpielyeah, I've seen sayid work in some places and not others and not known why#2019-11-2615:48bpielespecially, when other people have reported bugs, of course#2019-11-2615:48bpielmaybe a transitive dep??#2019-11-2615:49bpielso, after you execute a traced function, you still get nothing in the sayid buffer?#2019-11-2615:49Andrea Imparatoyep#2019-11-2615:50bpielok, that sucks#2019-11-2615:50Andrea Imparatoi see stuff on the repl so the code is running#2019-11-2615:50Andrea Imparatoand i also get the results from the function#2019-11-2615:51bpielgotcha. Yeah. bummer#2019-11-2615:53Andrea Imparatohmm i gotta a workspace no idea how lol#2019-11-2615:53bpielthe plot thickens!#2019-11-2615:53Andrea Imparatoš#2019-11-2615:59Andrea Imparatook i wasnāt not capturing data indeed#2019-11-2616:00Andrea Imparatothx for the help @bpiel š#2019-11-2616:00bpielNo prob! š#2019-11-2616:00Andrea Imparatoand thx very much for having created this amazing tool#2019-11-2616:00bpielyou're welcome!#2019-11-2616:00bpielgood luck with it#2019-11-2719:58didibusHave you just tried the Cider debugger?#2019-11-2719:59didibusIt has a trace option as well#2019-11-2809:28Andrea Imparatoyeah but sayid is way better š#2019-11-2809:28Andrea Imparato@bpiel i donāt get all the fancy colors on the stacktrace tho, do you know if this is a known issue perhaps?#2019-11-2809:29bpielHmmmmm... If it was known to me, I've forgotten#2019-11-2809:29bpielFont locking settings in emacs?#2019-11-2809:30Andrea Imparatocould be#2019-12-1016:05erwinrooijakkersspacemacs#2019-12-1016:13erwinrooijakkersI was referred here from #clj-kondo. I have the following config:
dotspacemacs-additional-packages
'(
flycheck-joker
flycheck-clj-kondo
)
(use-package clojure-mode
:ensure t
:config
(require 'flycheck-joker)
(require 'flycheck-clj-kondo)
(dolist (checker '(clj-kondo-clj clj-kondo-cljs clj-kondo-cljc clj-kondo-edn))
(setq flycheck-checkers (cons checker (delq checker flycheck-checkers))))
(dolist (checkers '((clj-kondo-clj . clojure-joker)
(clj-kondo-cljs . clojurescript-joker)
(clj-kondo-cljc . clojure-joker)
(clj-kondo-edn . edn-joker)))
(flycheck-add-next-checker (car checkers) (cons 'error (cdr checkers)))))#2019-12-1016:24kszaboYou should be using the develop branch of spacemacs, since that has native support for joker/clj-kondo: https://github.com/syl20bnr/spacemacs/tree/develop/layers/%2Blang/clojure#2019-12-1016:24kszaboThen your use-package section is not needed: https://github.com/syl20bnr/spacemacs/tree/develop/layers/%2Blang/clojure#enable-clj-kondo-linter#2019-12-1016:14erwinrooijakkersThis gives the error:
> Error (use-package): clojure-mode/:config: clj-kondo-clj is not a valid syntax checker
#2019-12-1016:15erwinrooijakkersDoes anyone know how I can fix this?#2019-12-1016:15erwinrooijakkers~clj-kondo does work for as far as I can see~ joker does work, clj-kondo does not#2019-12-1016:15erwinrooijakkersI get squiggly lines and suggestions#2019-12-1016:16borkdudedo you know for sure that's clj-kondo and not joker, since you enabled that too?#2019-12-1016:19borkdudeyou can check by e.g. typing (inc). clj-kondo will say: clojure.core/inc is called with 0 args but expects 1#2019-12-1016:20borkdudewhereas joker says: Wrong number of args (0) passed to core/inc#2019-12-1016:22erwinrooijakkersHi š Yes#2019-12-1016:22erwinrooijakkersIt says Wrong number of args (0) passed to core/inc#2019-12-1016:23erwinrooijakkersSo clj-kondo does probably not work. Thanks#2019-12-1016:23erwinrooijakkersIn my setup#2019-12-1016:24kszaboYou should be using the develop branch of spacemacs, since that has native support for joker/clj-kondo: https://github.com/syl20bnr/spacemacs/tree/develop/layers/%2Blang/clojure#2019-12-1016:24erwinrooijakkersI am using develop#2019-12-1016:24erwinrooijakkersAlright#2019-12-1016:24erwinrooijakkersSo I should just specify
(clojure :variables
clojure-enable-linters 'clj-kondo)
#2019-12-1016:25kszabo'(clj-kondo joker)#2019-12-1016:25kszaboto be exact#2019-12-1016:25erwinrooijakkersNow I have
(clojure :variables clojure-enable-linters t)
#2019-12-1016:26erwinrooijakkersNot sure if it means anything. I change to '(clj-kondo joker)#2019-12-1016:26kszabo(clojure :variables
clojure-enable-clj-refactor t
clojure-enable-sayid t
clojure-enable-linters '(clj-kondo joker))#2019-12-1016:26kszabothis is what I use (except joker, but it should work)#2019-12-1016:31erwinrooijakkersDoesnāt work for me#2019-12-1016:31erwinrooijakkersMaybe I didnāt install clj-kondo properly#2019-12-1016:32erwinrooijakkers$ clj-kondo
clj-kondo v2019.07.31-alpha
#2019-12-1016:33borkdudethat's a pretty old version of clj-kondo#2019-12-1016:33borkdudebut that should still work š#2019-12-1016:33borkdudeThere are some spacemacs docs here:
https://github.com/borkdude/clj-kondo/blob/master/doc/editor-integration.md#installing-on-develop-branch#2019-12-1016:34erwinrooijakkersHoppa#2019-12-1016:35erwinrooijakkers#2019-12-1016:35erwinrooijakkersUpgrading made it work š#2019-12-1016:35erwinrooijakkersThanks for all the help#2019-12-1218:16Drew VerleeIs anyones emacs crashing about once every 2 hours on stuff like... closing a buffer?#2019-12-1218:16Drew Verleemoving a widow#2019-12-1218:16Drew Verleeetc..#2019-12-1221:48agAnyone else having issues with Helm recently? Itās like super slow for me#2019-12-1302:27aisamuNot suuuuuuuuuuuper but definitely slower#2019-12-1317:06Mario C.I fat fingered some commands and now I dont know what state/mode I am in#2019-12-1317:07Mario C.Normally dw deletes a word but now when I hit d it just deletes the whole line automatically.#2019-12-1317:07Mario C.Pasting is weird too#2019-12-1317:10Mario C.This has happened before#2019-12-1317:10Mario C.Also the mini buffer below keeps showing an old search string#2019-12-1317:10Mario C.Idk if I am in a mode or if this is a bug#2019-12-1317:19spfeifferI once had that too suddenly, just restarted spacemacs and it was gone. Never happened again!#2019-12-1317:28Mario C.Yea I did restart it and it was gone but I just came back#2019-12-1317:28Mario C.I wish I paid attention to the last thing I did. I know it had to do with switching windows#2019-12-1317:48spfeifferIf it helps, not only d was working lnke dd, also y worked like yy . And it wasn't caps lock, because on my keyboard layout, caps lock is remapped.#2019-12-1318:07Mario C.Same here. Y working like yy and cap locks is my esc#2019-12-1318:46spfeiffer@mario.cordova.862 So this seems to be something reproducible. Somehow. But i also had no idea what exactly triggered thatā¦Emacs 26.1, Windows 10, spacemacs develop branch.#2019-12-1319:59adamfeldman@spfeiffer is there an Emacs 26.3 build available for Windows 10? Perhaps upgrading Emacs will solve the regressionā¦recently after updating Spacemacs on develop I had misc Spacemacs weirdness on macOS until I realized Emacs was a bit out-of-date#2019-12-1320:22spfeifferTBH i am not 100% sure it was ā.1ā, and i cannot recheck, because it was on my work laptop which i returned today because i quit š#2019-12-1320:23spfeifferSo i can also not test any upgrade suggestions. It did not yet happen on my private Ubuntu Laptop.#2019-12-1320:23spfeifferIf it does, i will dig deeper.#2019-12-1320:28Mario C.I am on macos though#2019-12-1320:29Mario C.It happened while I had a repl session going. Trying to switch windows to fast I must have missed clicked and did something funky or while trying to send code to CIDER#2019-12-1320:37lreadthe symptoms see similar to what I encountered. maybe this will help https://emacs.stackexchange.com/questions/35946/strange-behaviour-on-evil-delete/48282#48282#2019-12-1321:04spfeiffer@mario.cordova.862 For me, it surely was no REPL session (because work laptop)#2019-12-1321:06spfeiffer@lee Good catch, sounds like our problem. As i use SPC-/ often, it is possible it was like described there.#2019-12-1321:08spfeifferBut it says / , not SPC-/ . But still it could be this case.#2019-12-1321:09lreadfor me mouse use was the cause#2019-12-1321:12spfeifferYeah, i do not remember the exact circumstances, but it sounds like this could have happened to me (accidently)#2019-12-1611:58shanIāve had the exact same thing happen before and just restarted. That link from emacs.stackexchange worked perfectly for me.
(Iām on 26.3 emacs, 10.14.6 (Mojave) macos for reference)#2019-12-1619:16Drew VerleeCan you export the clojure formatting rules so they can be inspected and shared on a per project basis? I says here https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/clojure#features
it uses cljfmt, and that says you can customize it. But can you export the default settings? I need to find a way to set up projects so that multiple editors (intillji, vim, etc) can all have comparable formatting rules. And newcomers have a starting point for comparison if they want to use another one.
actually it says you can customize lein-cljfmt. But im guessing thats not what emacs with cider uses?#2019-12-1710:34shanseems like cljfmt is supported by most except intellij
https://github.com/weavejester/cljfmt#editor-support
https://github.com/cursive-ide/cursive/issues/1403#2019-12-1812:34practicalli-johnny@drewverlee my understanding is that Cursive (IntelliJ) has been following the same formatting rules as the default CIDER ones.
I would have thought a style formatter step in the CI would actually be more effective that trying to keep a range of editors in sync.
Or you could have a pre-commit hook locally to format the code. There was a brief discussion at https://clojureverse.org/t/autoformatting-clojure-code/1243
There are some other suggestions here: https://blog.ona.io/general/2016/02/07/automating-style-in-clojure.html#2019-12-1815:05Drew Verleethats a very useful insight. Thanks.#2019-12-2118:11practicalli-johnnyI've updated the Source Control section of the Practicalli Spacemacs book, giving an overview of how to use Magit client and how to configure Git and GitHub to work within Spacemacs (should also works for Emacs).
https://practicalli.github.io/spacemacs/source-control/
I have not been successful in using the built in wizard that sets up the GitHub personal access token. I have used this in the past successfully, but am getting a JSON 60 error. So for now, I am simply generating a personal access token on my GitHub account and adding it to my .gitconfig file. I find this much clearer to understand what is going on š#2019-12-2118:12practicalli-johnnyAny alternative approached are always welcome.#2019-12-2202:02practicalli-johnnyI recommended using SSH keys as I found problems authenticating when I have 2 factor authentication on my account (authentication did used to work with 2FA at one point, but not at present on develop). I find it much simpler to use SSH keys anyway š#2019-12-2614:03practicalli-johnnyA little while ago I noticed that SPC TAB was no longer respecting layouts in Spacemacs. This feature was part of develop but has since been removed it seems. There is a separate branch that has this code and it has been updated to require the spacemacs-layouts layer variable spacemacs-layouts-restrict-spc-tab to be set to true, t. Not sure if there is a bug with this code, or no one had chance to merge it to develop
https://github.com/syl20bnr/spacemacs/tree/0e9866efcee9915f3418cec11371d02ee619ced2/layers/%2Bspacemacs/spacemacs-layouts#2019-12-2614:13practicalli-johnnyAh, correction, its only the documentation that isn't included in develop (I will do a PR). To enable SPC TAB to only switch between buffers in the same layout, add the spacemacs-layouts variable to the .dotspacemacs-configuration-layers
(spacemacs-layouts :variables spacemacs-layouts-restrict-spc-tab t)
The spacemacs-layouts loads by default, so with this layer definition we are simply setting the variable.#2019-12-2616:02practicalli-johnnyI have created the PR https://github.com/syl20bnr/spacemacs/pull/13124 to add documentation to the layer, showing how to configure the restricted functions.
I have also added these details to the Practicalli Spacemacs book https://practicalli.github.io/spacemacs/working-with-projects/layouts.html#2019-12-2616:03practicalli-johnnyI am pushing more videos to the Practicalli Spacemacs book at the moment, if you have any suggestions for videos you would find useful, please let me know.#2019-12-2715:46practicalli-johnnyPull request now merged#2019-12-2716:56Drew VerleeMaybe the right idea is to not alias namespaces or use :refer as i find the clojure(script) tooling ecosystem often fails to be able to create an explorable link for you. E.g There doesn't seem a reliable way to find usages for a function so i end up doing text based searches.
If thats the case, maybe it would be better to have the tooling auto shorten the names and always use the full namespace.#2019-12-2721:19practicalli-johnnydid you post this to the right channel? sounds interesting, but seems to be responding to something that is not present here š#2019-12-2721:39Drew VerleeYour right, im not responding to anything. I was just pointing an idea out there.
I meant to post it here. The core issue is that i haven't found a consitant way to progmattical navigate clojure(script) projects.
Whats the command to show all the places a function gets used in an arbitrary clojure(script) project?
I have worked with 3 teams so far and not seen a solution nor heard of one talked about.
Oh sure, lots of half solutions: grep, clj-refactor, etc.. But they all have cavets. In the end, I spend a lot of manual time on these issues.#2019-12-2721:40Drew VerleeOur code is data, but not data we seem to be able to query effectively.#2019-12-2721:40Drew Verleehappy to be proven wrong on this one!#2019-12-2823:59practicalli-johnnyI am assuming you want all the locations to refactor the name of a function, as you mentioned refactor.
I use helm and iedit for this when it's across the whole project. Start with a project search, SPC / and use C-c C-e in the helm results to edit the results in another buffer. Then you can use iedit or multiple cursors to create simultaneous edits. When done editing, then C-c C-c saves all changes across the project.
If just changing within a namespace, I hide helm-swoop SPC s s and C-c C-e to edit the swoop results#2019-12-2823:59practicalli-johnnyI don't really understand what is meant by doing this programmatically.#2020-12-3107:51didibusDo you mean specifically for ClojureScript?#2020-12-3107:51didibusCause clj-refactor works for me in Clojure#2020-01-0101:24Drew VerleeI do mean specifically clojurescript. But I feel I have run up against times when clj refactor doesn't work in clj.#2020-01-0101:28didibusYou just have to make sure that your code compiles properly before using clj-refactor#2020-01-0101:28didibusTo make the refactor#2020-01-0104:43Drew VerleeI don't feel that's what I have experienced. I feel I have tried to use it and in multiple cases it has errored out on code that complies. But it's lazy of me to say that without providing examples.#2020-01-0115:28practicalli-johnnySince learning how to use the built in tools that Spacemacs provides my use of clj-refactor has plummeted. In fact I just removed it several months ago and haven't missed it at all.
I think cycling parens was the last thing I used, then I realised I could just do it in Evil with the same number of keys.
If using Holy mode with Spacemacs, then I assume there is a some small benefit to clj-refactor.#2020-01-0119:09didibusYou can use all the same commands from Holy.#2020-01-0119:09didibusBut Emacs commands aren't as language aware as a code analyzing refactoring tool.#2020-01-0119:11didibusThough I'd have to agree that clj-refactor isn't that great, and I too end up just using good old project search and replace most of the time. Just faster, plus it let's me find comments and documentation as well and rename those too#2020-01-0119:45practicalli-johnny@U0K064KQV I am aware that you can access all commands in Holy Mode, but I don't believe you can use Vim style editing in Holy Mode. That was what I was referred too when I said Evil replaced many Clojure specific refactoring for me. Sorry for the confusion. For example s c ( [ to change a list to a vector.
Yes, things like helm-ag, iedit, buffer narrowing are ubiquitous for Holy and Evil. I use them and Vim style editing and clever-parens and a little bit of lisp state for the majority of my workflow. Combined, these tools allow me to use the same set of keybindings across multiple languages, lowering my cognitive load for using Emacs (the main reason I move from Holy to Evil)
The only thing that actually analyses my Clojure code, I think, is clj-kondo and the REPL of course :)#2020-01-0214:47Drew VerleeThis is an example of the type programatic solution that I don't think it's reachable with text.
https://github.com/borkdude/carve#2019-12-2716:57Drew Verleeso instead of (:require [some.app.foo :as foo]) just use some.app.foo/function and have the editor shorten based on a universal preference... say the last two dots.#2020-12-3115:16practicalli-johnnyCurrently the sesman functions for managing REPL connections are missing Spacemacs keybindings from the Clojure layer. For more information about Sesman, see https://docs.cider.mx/cider/usage/managing_connections.html
I am proposing adding them (I've updated an issue I raise several months ago)
https://github.com/syl20bnr/spacemacs/issues/12593#issuecomment-569942842
It seems quite a big change, however, its mostly additive, with about 10 keybindings (which I believe are lesser used) being moved to a new sub-menu. Here is a summary
[x] Add keybindings for sesman commands into "ms" menu, adding "msl"
[x] Use sesman-start (wrapper around all jack-in and connect commands) - one keybinding to rule them all :)
[x] Refactor "mc" keybinding to "mRc" to clear the repl buffer and "mc" is now sub-menu for connect functions
[x] Rename "ms" menu from "repl" to "repl connections"
[x] Migrate keybindings from "ms" relating to using/sending code to REPL, to "mR" menu
I believe (hope) that these changes make the Clojure layer keybindings easier to understand, offer all the sesman commands and have very minimal (or no) impact on the majority of peoples workflow.
Feedback is definately apprecicate as I put together a pull request.#2020-12-3116:00practicalli-johnnyI have created a Pull Request for this change so you can try the changes for yourself if you wish.#2020-01-0212:41mmeixVery short question: eval top level sexp and pretty-print to comment : I would like to bind this to , e ; (such how it is written in the docs), but donāt know how (being a Spacemacs newbie)#2020-01-0212:49lispyclouds@mmeix maybe this should work by placing this in your .spacemacs file in the dotspacemacs/user-config section
(spacemacs/set-leader-keys-for-major-mode
'clojure-mode "e;" 'cider-pprint-eval-last-sexp-to-comment)#2020-01-0212:50mmeixtrying ā¦#2020-01-0213:00mmeixThanks, that worked! So all those personal settings should go into dotspacemacs/user-config - noted!#2020-01-0213:03lispycloudsyep, thats executed at the end when spacemacs loads and can override existing settings too.#2020-01-0213:03mmeixGreat, thanks#2020-01-0219:30practicalli-johnny@mmeix I am assuming you are using the master branch of Spacemacs, as the develop branch has that keybinding in already, along with about 2 years worth of improvements for the Clojure layer and Spacemacs itself (there will be a master release some day, but for now develop is quite stable) . You might also want to look at my online guide for Clojure development with Spacemacs https://practicalli.github.io/spacemacs/#2020-01-0219:30mmeixaha!#2020-01-0219:30mmeixwill install the dev build - thanks!#2020-01-0220:15practicalli-johnnyFeel free to ask any questions you have here, its a friendly channel and welcome to Spacemacs...#2020-01-0220:30mmeixThat would be this one, right?
git clone -b develop ~/.emacs.d
#2020-01-0300:32practicalli-johnnyI just clone
git clone ~/.emacs.d
and then git checkout develop in the .emacs.d directory it creates#2020-01-0310:52mmeixAh ok (guess I have to learn git proper)#2020-01-0318:08spfeifferWell, @mmeix, your command does exactly the same, but in one command instead of two. So it may be more "proper" š#2020-01-0319:38mmeix[learning ⦠and not speaking English natively]#2020-01-0221:00kwrooijenAny tools to convert javascript to cljs? Iām currently reading a book, and copy pasting javascript snippets, so I can rewrite them more easily. But having to rewrite them is a bit tedious and it would be nice if there was some sort of refactor function to (for example) convert:
foo.bar.baz("abc", 123);
into
(.. foo -bar (baz "abc" 123))#2020-01-0320:06practicalli-johnnyI would imagine that given the broad syntax of JavaScript, you would only get a very narrow translation if there were such a tool.
I would also be weary about direct translations. I appreciate you need to start somewhere, but the programming model between JavaScript and ClojureScript is not that close.
You can always put js/ in front of many javascript function names until you discover more about ClojureScript. Sorry, I can be of more help.#2020-01-0317:35Mario C.Certain words get color coded differently in comments such as TODO or NOTE . How can I add more words to the list of "comment keywords", for a lack of a better term?#2020-01-0320:07practicalli-johnny@mario.cordova.862 I just read something about that the other day, I think I was looking through Font faces. I assume that is where it is. Maybe there is something in SPC SPC customize that might help you narrow down your seach?#2020-01-0320:12practicalli-johnnyIf its just using org-mode configuration, then this is what I do to define states and colours https://github.com/practicalli/spacemacs-config/blob/master/.spacemacs.d/init.el#L654#2020-01-0320:28practicalli-johnny@mario.cordova.862 It seems I found it. If you SPC SPC customize and search for todo in the cusomize buffer, it should take you to Global Hl Todo Mode and a list of other faces. In the Hl Todo Keyword Faces section, you can find an alist of existing keyworkds (text to highlight). You can change the colours and values of the keywords. At the bottom of the list in the Ins button, so you can add more. These are the same keywords as defined in https://github.com/tarsius/hl-todo/blob/master/hl-todo.el#L106 so I assume this project is used in Spacemacs. It should be possible to add code to the dotspacemacs/user-config in your .spacemacs file to set these programatically.#2020-01-0320:47practicalli-johnnyI just added this to the dotspacemacs/user-config section of my .spacemacs file and rebooted. It seems to work quite nicely. Keywords are case sensitive, so todo is different from TODO.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Set Hightlight keywords
(setq hl-todo-keyword-faces
'(("TODO" . "SlateGray")
("DOING" . "DarkOrchid")
("BLOCKED" . "Firebrick")
("REVIEW" . "Teal")
("DONE" . "ForestGreen")
("ARCHIVED" . "SlateBlue")))
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#2020-01-0321:23Mario C.@jr0cket Thank you!! I couldn't figure what the right terms were to google this. Some solutions online didn't seem quite right! :thumbsup:#2020-01-0322:49practicalli-johnnyTerminology in Emacs is a whole new world, still much of an undiscovered country for me. I only had an idea because I had been playing around with the evaluation markers in the fringe, to make them stand out more (arriving in a pull request in the next week or so I hope). I would be interested to know what colours and keywords you find useful#2020-01-0716:19mmeixShort question (new in Spacemacs still): I just tried to export an org file as html with , e e h H, but got an error : Autoloading file /Users/meixner/.emacs.d/elpa/26.3/develop/yasnippet-20191222.2206/yasnippet.elc failed to define function yas-global-mode - where to begin to solve this? EDIT: turning off autocomplete seems to remedy this ⦠I had turned on autocomplete to test it in html files ā¦#2020-01-0716:42JcawDelete emacs.d/elpa/yasnippet-[numbers here]#2020-01-0716:43JcawIt will redownload and recompile it#2020-01-0716:43mmeixok, will try#2020-01-0716:43mmeixthanks!#2020-01-0716:44JcawMight not work but if a .elc (compiled elisp) file is causing problems that's normally the first thing to try#2020-01-0716:44JcawYou can also recompile manually but it's usually easier to just delete the whole package and restart#2020-01-0717:05mmeixtried this, but there seems to an incompatability with autocomplete, no problem, will turn this off (although autocompletion in web mode would be nice)#2020-01-0815:47practicalli-johnny@mmeix autocomplete and yasnippets are working well together for Clojure, so perhaps its just something specific to org-mode.#2020-01-0815:53practicalli-johnnyI just tried exporting a relatively simple org-mode file using , e e h H and it showed the html code in a separate buffer without any errors. I havent updated for a few months, maybe it is a recent bug.#2020-01-0815:54mmeixI will try again and report#2020-01-0815:55practicalli-johnnyIf you can share the org-mode file, that may be helpful. It could always be something in org-mode file that the export does not like. I am updating my Spacemacs to see if I can replicate#2020-01-0816:12practicalli-johnnyI just updated Spacemacs, the .spacemacs file from the template (`SPC f e D`) and updated a whole list of packages including yasnippets.
I successfully created an html export from these org-mode files https://github.com/jr0cket/developer-journal/tree/master/2019#2020-01-0818:30mmeix@jr0cket is this the master branch or develop?#2020-01-0818:33practicalli-johnnydevelop branch.#2020-01-0818:35mmeixI think something is wrong with my installation. I think I try to replace my .emacs.d and my .spacemacs with a fresh copy#2020-01-0818:36mmeixwill report#2020-01-0818:37mmeixI also have a problem with exporting latex-> pdf from org, because it doesnāt find pdflatex on its path#2020-01-0818:38mmeix(sorry for being newbie-like confused, I have a strong will to learn š#2020-01-0818:29mmeixok, the symptoms in my Spacemacs (develop branch) are: if I turn off autocompletion, I can export html from org-mode#2020-01-0818:38practicalli-johnnyHow are you turning autocomplete on and off?
I have autocomplete as a layer in my .spacemacs file. I assume that it's on automatically for all modes (something I only assumed and never checked).
Do you have any of your own yasnippets defined? Just wondering if any of them could be a problem (I seems unlikely though).#2020-01-0818:39mmeixI comment it in and out in .spacemacs#2020-01-0818:39mmeixI have not created any snippets so far#2020-01-0818:41practicalli-johnnyIt could be the version of Emacs. I tried on Emacs 27. I can try on Emacs 26.3. What is your version#2020-01-0818:41mmeix(I think layer auto-completion was commented put, when I opened develop the first time, but Iām not sure)#2020-01-0818:41mmeixemacs 26.3#2020-01-0818:42mmeixthis was the official Mac build i got from https://www.gnu.org/software/emacs/#2020-01-0818:43mmeixI could try a fresh install of everything#2020-01-0818:43mmeix((where would I find emacs 27?)#2020-01-0818:43mmeixit says āEmacs 26.3 - Latest release
Released Aug 28, 2019ā#2020-01-0818:45mmeixI will try to install v27#2020-01-0818:46practicalli-johnnyTried on 26.3 and it works just fine there too#2020-01-0818:47practicalli-johnnyI am thinking it might be something in your .Spacemacs file, or a package that didn't download correctly.#2020-01-0818:47mmeixok, strange ⦠I will install everything new and see ā¦. maybe some bonehead newbie thing going on here#2020-01-0818:47practicalli-johnnyDid you try to export one of my org files from the GitHub repository I shared?#2020-01-0818:47mmeixthanks for your time - really appreciated!!#2020-01-0818:47mmeixI can try that#2020-01-0818:48practicalli-johnnyIt could be the org file itself. The January 2019 org file works okay for me#2020-01-0818:53practicalli-johnnyIf not. I suggest using SPC f e D to compare your .spacemacs file with the current template. It launches ediff and you can press n to step through all the differences. Press b copy from the template into your own .spacemacs file, unless you know there is something you want to keep (layers, user-config)#2020-01-0818:53mmeixah! something new to learn .. will try!#2020-01-0818:57mmeixThatās a great tool#2020-01-0818:58mmeixthe main difference is, that I added three layers under dotspacemacs-configuration-layers#2020-01-0818:58mmeixjavascript, html, clojure#2020-01-0818:59mmeixmaybe this was an beginnerās error#2020-01-0820:50practicalli-johnnyAdding layers is what you should be doing to add specific features to Spacemacs. This section of the ,spacemacs file usually has more than the template. Also the dotspacemacs/user-config can have a lot of differences as you add your own configuration.#2020-01-0820:51mmeixI learned, that for the beginner itās safer just to make a file with a proper ending such as .html and let Spacemacs decide waht to install .. great!#2020-01-0820:52practicalli-johnnyHere is my .Spacemacs config
https://github.com/practicalli/spacemacs-config/blob/master/.spacemacs.d/init.el as an example#2020-01-0820:53mmeixThanks: something to learn from.#2020-01-0820:53mmeixah: clj-kondo#2020-01-0820:54practicalli-johnnyYes, Spacemacs will add the layer for you. This is easy. I usually restart Emacs after adding a layer just to ensure everything is installed.#2020-01-0820:55practicalli-johnnyThere is also the online guide if you are doing Clojure development https://practicalli.github.io/spacemacs/#2020-01-0820:55mmeixja, Clojure and org were the main motivations to come here#2020-01-0818:33mmeixIf I activate auto-completion I get the error Autoloading file /Users/meixner/.emacs.d/elpa/26.3/develop/yasnippet-20191222.2206/yasnippet.elc failed to define function yas-global-mode#2020-01-0818:36mmeixI think I saw the same or a similar error while Spacemacs did its update routine while starting#2020-01-0820:05mmeixOk, somehow this seems to have been user error, everything working now as intended. Thanks @jr0cket for help and time spent!#2020-01-0820:10mmeixnow the only problem to solve is: how to make Spacemacs find pdflatex (while exporting an org file) /bin/bash: pdflatex: command not found#2020-01-0820:18practicalli-johnnyOn develop there is a .spacemacs.env file you can use to add directories to the path that Emacs uses#2020-01-0820:19mmeixah, great!#2020-01-0820:20practicalli-johnnyIf something is only in your bashrc file and not in your profile, then it won't be picked up if you run Emacs from a graphic launcher, e.g not from a terminal window.#2020-01-0820:21practicalli-johnnyI usually source my .bashrc from my profile, that does mean I need to logout and log back in again if I add anything#2020-01-0820:22practicalli-johnnyOf you add anything to bashrc, then you would need to restart emacs#2020-01-0820:23mmeixGreat - that worked! All problems solved! Many thanks again!#2020-01-0820:25practicalli-johnnyhttps://develop.spacemacs.org/doc/DOCUMENTATION.html#environment-variables-and-path for future reference :)#2020-01-0820:31mmeixšš#2020-01-0918:52johanatanhi, does anybody know why the following code config would cause the w (advance-word) command to get stuck on the ends of lines which have a hyphenated token near the end?#2020-01-0918:52johanatan(with-eval-after-load 'clojure-mode
(dolist (c (string-to-list ":_-?!#*"))
(modify-syntax-entry c "w" clojure-mode-syntax-table)))#2020-01-0918:52johanatanthis code worked for me for several years, then suddenly stopped working.#2020-01-0918:52johanatani asked about it on here and someone copied it into their config and said it worked fine for them#2020-01-0918:53johanatanso then i decided to reinstall emacs and spacemacs from scratch and to copy this config change and only this config change and try it again#2020-01-0918:53johanatanbut even after that, it suffers the "hyphenated word near end of line (and a couple of other obscure cases) problem"#2020-01-1000:21practicalli-johnny@johanatan I had been using the following code in dotspacemacs/user-config to treat hyphenated words as a single word when in Clojure mode, although its been a while since I used it
;; In clojure-mode, treat hyphenated words as a single word.
(add-hook 'clojure-mode-hook #'(lambda () (modify-syntax-entry ?- "w")))
#2020-01-1007:37johanatanwow, just this change alone without my original changes also suffers the end-of-line hangup problem#2020-01-1007:28johanatan@jr0cket do you know if it would work for the entire list of chars considered in my snippet?#2020-01-1007:28johanatani.e., i mean if it were modified to do so#2020-01-1007:37johanatanwow, just this change alone without my original changes also suffers the end-of-line hangup problem#2020-01-1007:40johanatan@jr0cket would you mind sharing your entire .spacemacs file that i could compare against mine? (or I can do vice versa if that's better for you)#2020-01-1009:56Samuelhttps://github.com/practicalli/spacemacs-config/blob/master/.spacemacs.d/init.el
I would suggest using ediff to get some context
M-x ansi-term RET
i
curl > ~/.practicalli.el
fd
SPC E f f
<file `A' path> ~/.spacemacs
<file `B' path> ~/.practicalli.el
#2020-01-1013:30practicalli-johnnyThanks for sharing. I have just pushed a few updates, but non should affect your issue.#2020-01-1013:37practicalli-johnny@johanatan I removed the comment from my clojure-mode-hook code and restarted emacs. I am not experiencing any issues. It does not jump over -> in defn names, but then I wouldnt expect it to.#2020-01-1222:06johanatanThis is so weird. A coworker installed a fresh spacemacs and added your code change to it and he experiences the same problem I have (independently of any of my other configuration).#2020-01-1222:07johanatanPerhaps itās a difference between using .spacemacs and .spacemacs.d/init ?#2020-01-1012:44practicalli-johnny@johanatan are you restarting Emacs after making changes to your .spacemacs file? If not, then some code could still be in memory.#2020-01-1222:15johanatanYes, I always restart when making these types of changes.#2020-01-1013:40practicalli-johnny@johanatan I removed the comment from my clojure-mode-hook code and restarted emacs.
Using w on defn names that include -> are getting stuck. Not sure if this was the case before.#2020-01-1014:30practicalli-johnnyI updated the code to include more symbols and using w works correctly almost all of the time, but on occasion it will stick at the end of a line. How strange. I dont know how to start debugging this...
(add-hook 'clojure-mode-hook #'(lambda ()
(dolist (c (string-to-list "-_>?"))
(modify-syntax-entry c "w"))))#2020-01-1021:51jahsonI think you could use SPC h d b and search for the command mapped to w, using ^w.#2020-01-1222:07johanatanYes the sticking at the end of the line for lines that contain hyphens is the problem.#2020-01-1019:49mathpunkIt looks like my CIDER is a version behind, despite being on the latest develop branch of spacemacs. How can I upgrade it?#2020-01-1021:59jahsonYou should check possible sources for your CIDER version, like project.clj, profiles and global user profile for lein.#2020-01-1101:33practicalli-johnnyIf you are on Spacemacs develop branch then check you are not using spacelpa repository. In your .spacemacs file, check this setting is nil
dotspacemacs-use-spacelpa nil
#2020-01-1101:35practicalli-johnnyIf that is already set, then try moving or deleting the cider-* packages from $HOME/.emacs.d/elpa/<emacs-version>/develop/ directory and restart Emacs it should download the latest cider package.#2020-01-1101:38practicalli-johnnyAlso check your .spacemacs file to see if you pinned a package version of cider. Take a look in spacemacs-additional-packages
For an example of pinning, see http://jr0cket.co.uk/2017/03/spacemacs-managing-broken-emacs-packages.html#2020-01-1317:33mathpunkexcellent, thanks!#2020-01-1020:29MiloÅ” MoÅ”iÄHave you tried updating the packages manually? SPC f e U will update all of the packages, after a restart it should just work.#2020-01-1021:51jahsonI think you could use SPC h d b and search for the command mapped to w, using ^w.#2020-01-1222:07johanatanYes the sticking at the end of the line for lines that contain hyphens is the problem.#2020-01-1222:09johanatanThis turns out to be a surpassingly high proportion of lines in my case making the feature virtually a non-starter.#2020-01-1222:09johanatanBut I also observed the problem when the only additional char added was -#2020-01-1301:13practicalli-johnnyI rarely use w to move. I use f or SPC j j to jump around text in general. # to jump between symbol names and SPC k lisp state menu for most everything else. Maybe it's why I commented that code, as I didn't use it.
When I did try, I only found one line where it stuck with`w`, in the body of the function with a local name that used kebab-case. Seems we get quite a different experience.#2020-01-1319:37zanef and F are great. I've also really been loving evil-snipe: https://github.com/hlissner/evil-snipe#2020-01-1403:18johanatanDoes this mean that youāre not going to attempt to fix/diagnose it?#2020-01-1409:45practicalli-johnnyI copied the code someone else posted about a year ago, I think from the #cider channel. It's not code that I use and it's not part of Spacemacs or the Clojure layer.
As you have a need for such a feature you have a better chance of finding a resolution that works for you.
You could ask on the #cider channel for suggestions.
You could raise an issue on the Spacemacs GitHub repository and explain in detail how to replicate the problem, especially at the scale you were experiencing (it rarely happened when I tried, so don't have enough of a use case to help solve the problem).
Thank you.#2020-01-1319:37zanef and F are great. I've also really been loving evil-snipe: https://github.com/hlissner/evil-snipe#2020-01-1403:18johanatanDoes this mean that youāre not going to attempt to fix/diagnose it?#2020-01-1511:16maleghastHey there, has anyone figured out how to use lispy / evil-lispy with Spacemacs yet..? (My Google-fu is failing me)#2020-01-1511:57kirill.salykinhttps://github.com/kirillsalykin/dotfiles/blob/master/.spacemacs#2020-01-1511:57kirill.salykinoh, sorry#2020-01-1511:57kirill.salykinI am using lispyville#2020-01-1511:58kirill.salykindotspacemacs-additional-packages '(editorconfig lispyville)
#2020-01-1511:58kirill.salykinand then you need something like this:
(lispyville-set-key-theme '(operators
text-objects
wrap
slurp/barf-cp
additional
additional-motions
(additional-wrap normal visual insert)
additional-insert))#2020-01-1511:59kirill.salykinbut again, it is lispyville (something similar to evil-lispy?)#2020-01-1512:11aisamuYup, lispyville with lispy.
use-package worked out of the box, (defined on a private layer just for convenience)#2020-01-1517:41maleghastThanks š#2020-01-1511:57kirill.salykinI did#2020-01-1517:41maleghastThanks!#2020-01-1614:45flefik#2020-01-1621:15practicalli-johnny@cfeckardt There is a :files ("filename" ,,,) key that may be what you need. It's on the readme of the GitHub project
https://github.com/melpa/melpa#2020-01-1621:17practicalli-johnnyThere are several examples of using files on different paths on that readme file#2020-01-1621:20flefikThanks, I couldnāt find that readme#2020-01-1621:20flefikItās not there in quelpa and I didnāt think to check the melpa docs#2020-01-1621:21flefikthis does indeed save my bacon thanks @jr0cket youāre a star#2020-01-1621:55practicalli-johnnyI was good at googling things before they invented Google. Unfortunately I don't scale š#2020-01-1622:12flefik@jr0cket if youāre not scaling then let me send some Sainsburyās mini-brownies your way. They should help with that.#2020-01-1718:29eccentric JWould anyone happen to know why if I have multiple frames open and use dired to open a file in frame 1, Emacs switches to frame 2? The file is opened in frame 1 so it's of no help to me that it switched frames.#2020-01-1801:28johanatancan someone try enabling global-superword-modeand see if they suffer the line-ending hangs that the other workaround I mentioned does? both approaches suffer this problem for me and superword-mode is something built in to emacs so that should definitely be supported.#2020-01-1802:35flefiksure, do you have exact steps to repeat?#2020-01-1803:07johanatanEnable superword mode. Then hit āwā a few times. See if the cursor gets stuck at the end of any lines.#2020-01-1811:13practicalli-johnny@U0E98NQG2 with global-superword-mode on I get the same sticking experience as using the modify-syntax-entry custom code I shared with you previously.#2020-01-1811:14practicalli-johnnyspecifically in the latest test it sticks on a closing backtick character, but its not at the end of a line, its at the end of the first word in a comment#2020-01-1811:15practicalli-johnnyIn the tests I rebooted Emacs after commenting the modify syntax code. w did not stick. Enabling superword mode then sticks in the same place.#2020-01-1811:22practicalli-johnnyI also get sticky cursor randomly at the end of a commented line where it has a hyphenated word; a line that has an hyphenated word at the end followed by ) , sticking before the closing paren; the end of a line with a hypenated word followed by )] ; the end of a line with only a hyphenated word#2020-01-1811:24practicalli-johnnyIt does not stick on a hyphenated word followed by another word. If I add a non-hypenated word after any point that is sticking, it does not seem to stick (more testing required for this)#2020-01-1811:33practicalli-johnnyI tested superword mode on the following Clojure code. https://gist.github.com/e002d901c5c22bc8a5b00c389584e98d
I have added the word fish directly after all the places where the cursor sticks when pressing w, thus stopping the cursor from ever sticking. If you remove the word fish , the cursor will stick in all those places.
So it seems where ever there is a hyphenated word at the end of a line or before a closing character, eg. parens or backtick, the w key will stick
If a hyphenated word is followed by a non-hyphenated word or parens that do not close, e.g. [] then w does not stick.
I dont have time at the moment to find the root cause of this, but feel free to use my tests to raise issues or diagnose the issue yourself. Thanks.#2020-01-1814:54johanatanWhere would be the correct place to report this bug as with this repro it requires no custom code, just enabling a mode that one would presume should work.#2020-01-1900:03practicalli-johnnyIf superword mode or function is part of Emacs, then report on Emacs itself. If superword mode is a separate package, then report it on that.
For the custom code, then reporting it to the relevant evil package seems appropriate.#2020-01-1900:04johanatanThe problem isnāt with superword mode: itās with the combination of superword mode and clojure mode.#2020-01-1900:04johanatanAnd Iām not going to do anything about reporting the custom code as a fix for superword mode would be a fix for that custom code as well. #2020-01-1900:05johanatanAnd as youāve demonstrated, people arenāt exactly keen to step up and make fixes for ācustom codeā. A built in mode however seems much more relevant #2020-01-1900:13practicalli-johnnyCertainly if they don't use it themselves. Even if you find a fix, I don't need it. I don't use Evil the way you do so this is irrelevant and of no benefit to myself.#2020-01-1900:23johanatanYep understood #2020-01-1802:34flefikIām having a little bit of trouble getting a function to work as intended (Iām pretty new to elisp)
https://github.com/cfeckardt/spacemacs/commit/032a90438972ecd26d0324b236f1a5284633fed2#diff-69157042577fd397dbc40e8868316d9dR44-R48
Basically I want the hook to run and check the root of the project for a file called WORKSPACE, and if that exists activate the minor mode called bazel-build-mode.
Would be grateful if someone could take a look. Cheers!#2020-01-1811:35practicalli-johnny@cfeckardt I suggest you also share your issue in the Spacemacs Gitter chat, probably get more help for this particular challenge there https://gitter.im/syl20bnr/spacemacs#2020-01-1923:41pithylessAnybody using aggressive-indent-mode in clojure-mode? I'd like to use it, but it has a very noticeable lag - especially if I move larger code blocks around. The emacs profiler looked like this (during a test scenario where the lag was not particularly bad): I'm using spacemacs + clojure layer + evil + lispyville, but the only noticeable difference is whether I enable/disable aggressive-indent-mode. emacs version 28.0.50 and spacemacs develop branch.#2020-01-2002:52practicalli-johnny@pithyless I haven't noticed any lag with aggressive indent for the last 6 months I've used it. I don't use lispyvile, maybe that makes a difference, maybe formatting is being duplicated.
I was using Emacs 27 but recently switched back to 26.3. Operating system is Ubuntu Linux (19.10). Didn't experience problems on either, so it could be a change in 28.
Or it could be that your large code blocks are very large indeed. Do you notice the lag with normal sizes code blocks (not large ones)?#2020-01-2022:52zane@pithyless On my 2013 Macbook Pro I can definitely feel a slowdown when using aggressive-indent-mode with medium-to-large size files. I'm on 26.3 and I don't use lispyville.#2020-01-2110:44pithylessI'm on a 2015 Macbook Pro; I'll investigate further - the perfomance is worse if you also enable clojure-align-forms-automatically.#2020-01-2110:45pithylessAre there any alternatives to aggressive-indent-mode that do something similar?#2020-01-2110:45pithylessI see there is e.g. a lispyville-prettify#2020-01-2111:04practicalli-johnnyI use align-arguments, align-forms and agressive-indent
https://github.com/practicalli/spacemacs-config/blob/master/.spacemacs.d/init.el#L712-L722#2020-01-2023:55MatthewLisp@pithyless I use aggressive ident mode, and never noticed any lags #2020-01-2023:55MatthewLispAnd BTW, I came here because Iām searching for how I can auto activate aggressive ident mode on startup, right now I toggle on every time I open spacemacs #2020-01-2108:47practicalli-johnny@matthewlisp set aggressive indent in your .spacemacs config file https://practicalli.github.io/spacemacs/improving-code/formatting/automatic-indenting.html#2020-01-2109:10kirill.salykinmorning
so some reason swoop is not working for me anymore - it does filter out rows (swoop-helm)
anyone else also sees it?
(dev branch)#2020-01-2111:09practicalli-johnnySwoop is working okay for me (develop - last updated 31st December 2019)
I call it from Symbol highlight transient state#2020-01-2112:10kirill.salykini just update today both spacemacs and packages#2020-01-2112:10kirill.salykinupdated*#2020-01-2115:08practicalli-johnnyI can test on another laptop later tonight, I'll do a spacemacs and package update. Suspect its the package that has the bug. You can always roll back the packages if its stopping you being productive.#2020-01-2115:18kirill.salykinnot that urgent, just was currious if it may be my setup#2020-01-2115:18kirill.salykintrue, I can rollback,
thanks#2020-01-2314:30practicalli-johnnyI updated Spacemacs to the latest develop , spacemacs template (no change in a while) and the latest packages. The way I use swoop seems fine.
I tried it from symbol hightlight transient state and SPC s s and didnt notice any issues.#2020-01-2314:30kirill.salykinIt was fixed yesterday with helm-swoop package update#2020-01-2321:04practicalli-johnnyThose package maintainers are good at fixing things quickly, many thanks to them all.#2020-01-2409:30kirill.salykinthanks for trying!#2020-01-2112:04practicalli-johnnyBased on your feedback, here and on GitHub, I have refactored the proposed keybinding changes to something I believe will be acceptable. I dont believe it affects more than a few keybindings in anyones workflow, whilst adding all the sesman tools. It also creates a nice separation between managing CIDER repls in , s (`s` is a defacto standard in Spacemacs across languages) and using the repl to evaluate , e
I have dropped the , R menu and moved the send-to-repl functions to the , e evaluation menu, as after all these functions are sending code to the repl buffer to be evaluated.
I have changed clearing the repl buffer to , s l which aligns with the keybinding for clearing terminal windows in general, so it should help with muscle memory.
I appreciate your feedback on the GitHub repo and if acceptable, I will add the documentation and changelog entries and as the maintainers to merge the change.
https://github.com/syl20bnr/spacemacs/pull/13140#2020-01-2114:11flefikThanks for your hard work#2020-01-2317:11didibusThese do look better then initially proposed#2020-01-2317:11didibusWill need to readjust my muscle memory, as I used most of the , s bindings, but I'm behind having more logical organization of the bindings in general#2020-01-2317:14didibusThe only binding I find weird is cider-refresh-nsx seems thats an evaluation to me#2020-01-2317:14didibusI would have had it with , e#2020-01-2317:19didibusThough I admit its a trickier one, cause it can be seen as a soft restart as well#2020-01-2317:19didibusOverall looks good!#2020-01-2321:03practicalli-johnny@U0K064KQV I guess if you use SPC p a to switch between source and test code in your projects, it should help move to , s a to toggle between REPL and source code. And of course a and s are next door, but I appreciate muscle memory takes time to adapt.
I did think about adding something to the top level to switch, as there are a lot of free keys, so doing something like , s z but as I dont use the REPL buffer its hard to test.
I agree with you about cider-refresh-ns I think this should also be in the evaluation menu. I would be happy to move this too if there is concensus, so probably , e x as the new cider-refresh-ns. Any more for or against?#2020-01-2321:05practicalli-johnnyIn the next few weeks I will have a look to see if there are any other missing keybindings.#2020-01-2419:41Mario C.I know I should use a debugger (And I do here and there) but I find myself doing a lot of good ole fashion println 's. That being said I would like to be able to highlight a let binded variable and use a command to automatically add on the next line a _ (println "<selected-variable>: " selected-varaible) . Does anyone have any links that would point me in the right direction or similar functionality that I can use as a template to make something like this?#2020-01-2421:04kirill.salykinmaybe https://github.com/weavejester/hashp#2020-01-2421:41Mario C.Hmm this may work#2020-01-2423:59practicalli-johnny@mario.cordova.862 I am sure pressing , d b on a function you wish to debug and then calling that function is much less effort than writing a template. You can debug multiple functions and expressions... And just eval the functions you marked for debugging to stop debugging them.
There is a video here that shows just how simple it is
https://youtu.be/jHCch3-Yuac#2020-01-2501:05Mario C.@jr0cket I do that with easier to use functions but sometimes when I do that CIDER slows down during execution since I think it's trying to display a giant blob of data.#2020-01-2510:15practicalli-johnnyOh, thats not so good. You can skip over parts of the code that generate large results, using o rather than n . But if you have a lot of data going in from the start that could be tricky.#2020-01-2515:53KamuelaFor a new user who maybe doesn't necessarily love vim but doesn't know emacs at all: vim mode or emacs mode in the initial setup?#2020-01-2516:09Richardgive vim mode a go. You can always switch later and it's easy toggle between the two.#2020-01-2516:23practicalli-johnny@kamuela I suggest learning Vim style editing is comparable in complexity to learning all the Emacs style keybindings. Actually I found Vim style editing easier than trying to remember if it was C-x or C-e a command was supposed to start with. And you dont need to learn all of vim straight away. Here is a quick Vim editing guide for Spacemacs https://practicalli.github.io/spacemacs/editing/vim-style/vim-quick-reference.html#2020-01-2516:25practicalli-johnnyIf you get stuck with Vim style editing, just hit C-z (Ctrl and z) and it switches that buffer to Emacs editing. The same keys switch you back to Vim style editing.#2020-01-2516:30practicalli-johnnyUnfortunately, my last pull request, https://github.com/syl20bnr/spacemacs/pull/13140 broke the Spacemacs keybinding conventions, https://github.com/syl20bnr/spacemacs/blob/develop/doc/CONVENTIONS.org#repls. The PR has been rolled back, so if you update Spacemacs now, you will get the old set back. I will work on another PR, but first I have sought clarification about the conventions https://github.com/syl20bnr/spacemacs/pull/13140#issuecomment-578419185#2020-01-2516:43KamuelaWas cider supposed to auto-install when I selected y after trying to open a .clj file the first time?#2020-01-2521:51practicalli-johnny@kamuela yes, the Clojure layer is automatically added to the list of layers in your .Spacemacs file. However, I always restart Emacs to make sure all the packages have been installed correctly.#2020-01-2521:52practicalli-johnnyI also recommend using the develop branch of Spacemacs, as it has lots of fixes and features not on the default master branch.#2020-01-2521:53practicalli-johnnyhttps://practicalli.github.io/spacemacs/install-spacemacs/#2020-01-2603:38eccentric JHas anyone separated their system clipboard from their emacs clipboard? I've followed the advice in https://stackoverflow.com/questions/24196020/how-to-stop-emacs-from-contaminating-the-clipboard but it has not appeared to make a difference. Deleting anything still overwrites my system clipboard.#2020-01-2610:13practicalli-johnny@jayzawrotny no, haven't had the need to separate system clipboard and Emacs kill ring. I don't understand why you would need to do this, sorry.
In Spacemacs I use the paste transient state, so I can easily cycle through the kill ring history
https://github.com/practicalli/spacemacs-config/blob/master/.spacemacs.d/init.el#L385
I don't do a lot editing outside of Emacs, so don't need to worry about what Emacs puts on the kills ring for other apps. If I want to paste something from the system clipboard, I expect it to be the last thing I put on the Emacs kill ring.
On the fairly rare occasion I need to paste something into Emacs before deleting, well that is what I do. In Vim style editing it makes much more sense to do that, as they you can use d t to delete to what ever character is after the end of the text you no longer want.
Sorry I can't be of more help.#2020-01-2616:45eccentric JMy brain thinks the way vim works where I can copy code after researching a workaround in docker, bash, w/e then go into the editor, delete or change text, then paste the text from clipboard. Iāll do my best to adapt but I still like using vscode + vim, atom + vim, and vim so clipboard consistency would be appreciated.#2020-01-2618:18zanepaste-transient-state has never worked for me. I'm only now realizing that that's because it only works if you use p in normal mode to paste, not if you use CMD p from the osx layer.#2020-01-2619:59eccentric JPlaying with that myself. Itās going to take some time to get used to that if I canāt separate the clipboards. I also found if you do paste with cmd v and press M-y it cycles as well, which feels a bit more accessible to me.#2020-01-2706:53eccentric JProgress! That setting works as expected on the https://emacsformacosx.com/ where as it doesnāt seem to work on the railscat emacs-mac port.#2020-01-2717:06practicalli-johnnyI found the Emacs for MacOSX install to be the only one worth installing.#2020-01-2716:55practicalli-johnnyI have another version of a pull request to add the Sesman keybindings to the Clojure layer. The keybindings are split along these lines
⢠SPC m c for REPL session management with Sesman, with commands to also connect adhoc buffers and directories to a REPL
⢠SPC m e for evaluating code using source code buffers (no need for a repl buffer to be displayed)
⢠SPC m s to send code to the REPL, assumes you want to actively use the REPL buffer
The SPC m s menu is largely unchanged, just moved a couple of keybindings to match Spacemacs convention. The biggest change is starting the REPL, using sesman you are prompted with a choice of Clojure and/or ClojureScirpt REPLs to either jack in or connect too, all from one prompt. So you only need to remember SPC m ' or ,' to start any REPL.
I've added a few missing formatting key bindings, especially for .edn files
Added the evaluation to point that someone asked about a while ago.
You can also reload the namespace or all namespaces from the SPC m s or SPC e menus
I also updated the documentation in the README of the layer to include the basics of how to use the features of the layer, along side as the configuration and keybindings documentation
https://github.com/syl20bnr/spacemacs/pull/13215#2020-01-2718:45practicalli-johnnyI have pushed an update to the PR, as the format menu has the Spacemacs convention of = , so moved SPC m f to SPC m = . The , = shortcut to format the buffer is now moved to , = = , so should be minimal impact.#2020-01-2722:05eccentric JAfter switching from emacs-mac to https://emacsformacosx.com/ I notice frames are not put into OS X tabs. I'm guessing that's a feature specific to emacs-mac, but is there a way to visually show or list current frames?#2020-01-2722:11practicalli-johnnyI dont know a visual way, I use SPC b b to show open buffers. This can get quite long if you have Emacs open for a while, so I gave layouts a try and they are my new project scoped tabs. With layouts then SPC b b is scoped to just the project. Example: https://practicalli.github.io/spacemacs/working-with-projects/layouts.html#2020-01-2800:15eccentric JThanks, I'll give this a read!#2020-01-2722:11practicalli-johnnyThe only visual thing I have used is treemacs, but as I am not very mouse driven I didnt enjoy using it.#2020-01-2722:22practicalli-johnnyIf I had tabs in Spacemacs, then it would probably look as messy as my browser š#2020-01-2819:31eccentric JI found tabbar which is kind of like what you were thinking for buffers. I'm not loving it though and the list of buffers\tabs it displays seems to jump around which is a bit confusing to me. But yes, just OS X window tabs for frames. Though I did learn emacs is opening frames in separate windows which is fine.#2020-01-2722:23practicalli-johnnyOh, you were talking about Mac OSX tabs, sorry, didnt read correctly. I have no idea, sorry.#2020-01-2723:19practicalli-johnnyThere seems to be a bug with the latest magit-section package, so doing a package update will break magit. The magit status buffer does not overlay the display correctly for the diff. It also doesnt update when staging changes, although I think it still does stage when you press s .
To fix I deleted all magit packages from the .emacs.d/elpa directory, set this recipe in dotspacemacs-additional-packages in .spacemacs
(magit
:location (recipe
:fetcher github
:repo "magit/magit"
:commit "4d6bc190b2334fa226035d13fcdfce3cca55d7be"))
and restarted Emacs a couple of times and the magit-diff works just fine.
I do get a warning on first reboot about magit version, I assume this is because it hasnt compiled in time Emacs has loaded or is loaded after something that depends on it.#2020-01-2823:43practicalli-johnnyMagit is working fine again. I closed the issue where magit showing the text only view of the diff in magit status.
Now magit is working again, you can always try out my latest update to the Clojure layer keybindings and see if they work for you. I would be interested to hear if anything is missing or seems illogical / akward
https://github.com/syl20bnr/spacemacs/pull/13215#2020-01-3012:24practicalli-johnnyIf anyone has any more feedback on my proposed keybindings for Clojure, please let me know (here or on GitHub). I will see if I can get them merged at the weekend
https://github.com/syl20bnr/spacemacs/pull/13215#2020-01-3013:19mccraigmccraigi updated my spacemacs (`develop` branch) yesterday, and now my helm M-x completion is not nearly as fuzzy as it used to be (e.g. i used to be able to type just cico to match cider-connect now i have to type cider-c)... anyone have any idea how i get the old fuzzy behaviour back ?#2020-01-3013:28aisamuDid you update the packages after doing that? Sometimes develop breaks things, but most commonly package updates are the culprit.
Either way, if it's urgent you can always checkout the previous develop commit (with git) and roll back the package updates (with the button on the home buffer)#2020-01-3013:30mccraigmccraigupdating the packages borked with some compilation errors, so i removed my elpa directory and reinstalled everything from scratch (which worked fine)#2020-01-3013:31mccraigmccraigbut it's not urgent, or severe - everything is working - just slightly differently from how it used to, and i slightly prefer the old way#2020-01-3013:33aisamuIf it's any consolation, mine's is also like that. (Last updated a month ago)
If you search for ci co, though, you get the completion#2020-01-3013:36aisamuFunnily enough, searching for files works as you describe (e.g. p c r b matched the same as pcrb -> perf-test/clj/reitit/bide_perf_test.clj)#2020-01-3013:36mccraigmccraigah, ok, i hadn't spotted that you could use a space like that... that's not so bad then#2020-01-3013:37mccraigmccraigbut yeah, i noticed it's only for M-x my projectile-find-files helm is as before#2020-01-3013:37mccraigmccraig:man-shrugging: i fear i don't care enough to dig into the source š¬#2020-01-3013:43aisamuhttps://github.com/syl20bnr/spacemacs/issues/13100#2020-01-3014:04practicalli-johnny@mccraigmccraig if you try my pull request, then its just , ' and c RET to select cider-connect-clj š Sesman can be used to launch any type of repl, using either cider-connect or cider-jack-in.
Or you can do M-x ses st if you prefer, which works without my pull request#2020-01-3014:06mccraigmccraigwhich PR is that @U05254DQM?#2020-01-3014:10practicalli-johnnyThe one I have been obsessing about for a week š
https://github.com/syl20bnr/spacemacs/pull/13215#2020-01-3014:10practicalli-johnnyyou can just give sesman a try without it though, its been part of CIDER for ages now#2020-01-3014:12practicalli-johnnyIts quite easy to try PR's, here is an overview and video (no pressure to try my pr though if you are busy)
https://practicalli.github.io/spacemacs/source-control/magit/testing-pull-requests.html#2020-01-3014:21mccraigmccraigyeah, i already use sesman, it's often the only way with our multi-module monorepo#2020-02-0122:26practicalli-johnnyKeybinding updates for the Clojure layer are now part of develop branch. https://github.com/syl20bnr/spacemacs/pull/13215
There is a new menu, SPC m m or , m for managing REPL sessions with sesman. This includes info about the current repl, a repl browser and lots of linking and sibling repl goodness for those who work on multiple related projects concurrently.
The format menu is now SPC m = or ,=, which is the convention across all languages. I also added a few keybindings that were missing, including formatting for edn files.
A few other keybindings have changed to follow convention, but hopefully these won't affect your workflow too much.
I have also greatly improved the layer documentation, so it should be a lot more helpful in understanding the layer and how to use it.#2020-02-0211:04kirill.salykinThank you!#2020-02-0621:47bfayThank you!!!!
I think the sesman integration is going to make life a little less frustrating#2020-02-0211:04kirill.salykinThank you!#2020-02-0418:29mathpunkoh wowowowow#2020-02-0418:30mathpunk@jr0cket thank you for your work on this, I am stoked to try this out#2020-02-0418:50practicalli-johnny@mathpunk thanks. Any feedback is welcome. It's gone through a few revisions, bit seems to work well for me so far.#2020-02-0521:36David SchmidtIām pretty new to emacs (and even moreso spacemacs) as a vim user. Iād like to add lispy + lispyville to have paren-safe vim commands while editing clojure code. I donāt think this comes in the base clojure layer, and Iām not really sure what the right way / right place to do this configuration is. If anyone could point me in the right direction Iād really appreciate it!#2020-02-0612:37aisamuI've sort of made it work with a private layer and two calls to use-packages (lispy, and lispyville). Configuration went on the :init key#2020-02-0615:17David SchmidtThanks for the advice! Iām thinking itās possible I never got evil-cleverparens working correctly (which is why I used lispyville originally). If I still canāt figure that out, Iāll follow your suggestion.#2020-02-0601:30theeternalpulseHas anyone had any issues with the SPC b (n/p) I get very inconsistent results. I can sometimes go to a previous buffer, but next sometimes bounces me to completely unrelated buffers in history. If I do "previous" then "next", the next buffer is not the bufer I started from.#2020-02-0601:30theeternalpulseI've had this issue for quite some time and just now rely on the projectile navigation since I haven't found any signs as to why this is happening#2020-02-0611:28practicalli-johnny@david.schmidt as far as I know there is not a layer for lispyville, so you will need to configure it manually. There seem to be some guides on the Internet to do this, but I have not tried. You may have to disable smartparens and evil-cleverparens so they dont conflict with each other, as they are doing the same thing. Also you may need to disable aggressive indentation and any other automatic formatting of your code. It seemed a fair bit of work for no real difference to smartparens and evil-cleverparens. If you do find something that works though, I am sure we would be interested to try it out.
Evil-cleverparens is the package included in Spacemacs for structural editing in Evil state. You can toggle this with , T s in supported language modes (Clojure, lisp). You can also set it permanently in .spacemacs. I'm working on a quick guide to the most used keys here https://practicalli.github.io/spacemacs/structured-editing/cleverparens.html#2020-02-0615:13David SchmidtThat guide is super helpful, Iām definitely going to go through it. I donāt think evil-cleverparens comes by default with the clojure layer. I had the clojure layer installed previously and the SPC m T s and , T s commands were undefined. I added it it to my dotspacemacs-configuration-layers and it seemingly installed it. Despite that,
(spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hook-clojure-mode)
seems to throw the error:
Error in dotspacemacs/user-config: Symbol's function definition is void: spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hook-clojure-mode
and those previously mentioned commands still seem undefined. Any idea what the issue is? @U05254DQM#2020-02-0615:59practicalli-johnnyOn Spacemacs develop branch evil-cleverparens is part of the layer, but its not activated by default (sorry, should have been clearer) Are you on Spacemacs master (default) branch?
If you are on master there is a significant difference in the Clojure layer and a lot fewer keybindings set up, so I strongly recommend you use develop instead. Its what I have used for the last 2 years or more.#2020-02-0611:33practicalli-johnny@theeternalpulse I havent experienced issues with buffer selection, although I mainly use layouts and SPC b b to navigate. I tried SPC b p and SPC b n in several combinations but couldn't replicate the issue. I also tried the buffer transient state, SPC b . and couldn't recreate the issue. I tested on two similar setups, one with the latest develop branch and another with a develop branch from a few months ago. I am using helm. If you are using Ivy, that may narrow down the issue perhaps. I suggest asking in the Spacemacs Gitter chat as it has a wider audience.#2020-02-0613:01theeternalpulseI am using Ivy, I'll try to debug when I have some time at work tomorrrow, I don't have this issue with my normal emacs custom config I use#2020-02-0614:43practicalli-johnnyIts a strange one, good look. Maybe something in the Ivy layer for Spacemacs trips the buffer previous/next commands.#2020-02-0622:58theeternalpulseIt seems that doing the counsel-projectile-find-file doesn't add the buffer to whatever is iterated by next and previous buffer. guess i have to debug counsel as well#2020-02-0615:54David SchmidtThis is probably not ideal but it seems to work!
;; In dotspacemacs/layers
dotspacemacs-additional-packages '(lispy
lispyville)
;; In dotsmacemacs/user-config
(use-package lispy
:defer t
:hook ((emacs-lisp-mode
clojure-mode
cider-repl-mode)
. lispy-mode))
(use-package lispyville
:defer t
:hook ((emacs-lisp-mode
clojure-mode
cider-repl-mode
lispy-mode)
. lispyville-mode)
:config (lispyville-set-key-theme '(operators c-w wrap additional additional-movement slurp/barf-cp)))
;; the config themes are optional
#2020-02-0722:37aisamuNote that you can also combine those commands in a private layer, and then just refer to that on the main config file#2020-02-0715:50mccraigmccraigTIL SPC b U and i can see my magit buffers in my helm buffer-list again :the_horns:#2020-02-0716:07practicalli-johnnyOh dear, I have 86 magit buffers open I wasnt aware of. I dont think I will be using SPC b U to often, reality can be scary š#2020-02-0716:08practicalli-johnnyOf course I could just use SPC u q to leave magit and actually close the buffer#2020-02-0716:32mccraigmccraigi must have good habits - i rarely have more than a few magit buffers open, i think i quit them by reflex when i'm finished in them#2020-02-0717:28plinshey everyone, any tips on how to open Treemacs at spacemacs startup? Im using the developer branch#2020-02-0717:31practicalli-johnnyIf there is any such setting, then its probably documented in https://develop.spacemacs.org/layers/+filetree/treemacs/README.html#2020-02-0717:43plinscalling treemacs from the user-config function opens it but after everything is loaded it collapses
should I use some hook to open it after everything (sorry for the noob question)#2020-02-0722:01practicalli-johnnyIf its not in the document I linked to, any answer I give would just be a guess. If a hook is needed, then there are some examples in my .spacemacs config here for different modes, maybe it will give you a few clues. https://github.com/practicalli/spacemacs-config/blob/master/.spacemacs.d/init.el#L660
If no one has an answer in this channel, I suggest asking in the main Spacemacs chat at https://gitter.im/syl20bnr/spacemacs#2020-02-0717:32practicalli-johnnysorry, I dont use treemacs myself#2020-02-0717:33plinsIve just switched to the development branch and SPC f t opens up treemacs instead of neotree#2020-02-0717:33plinsthanks anyway š#2020-02-1007:42jumarI don't know what happened (I'm not aware of any changes) but recently I started getting this error when trying to evaluate anything in REPL#2020-02-1007:55jumarFound it!
cider-font-lock-max-length was set to t instead of a number for some reason.#2020-02-1217:24Drew VerleeI know i can had clj options to my dir locals so there run as part of cider-jack-in. But is there a way to specif them when you just run the cider-jack-in command? i want a more dynamic way to trigger them.#2020-02-1217:25Drew Verleehttp://jr0cket.co.uk/2019/07/CIDER-jack-in-to-Clojure-CLI-projects-from-Spacemacs.html#2020-02-1218:55practicalli-johnny@drewverlee SPU u before the call to cider-jack-in will give a prompt with the full jack-in command. You can then add -A:test after clojure in that command#2020-02-1218:57practicalli-johnnyhttps://practicalli.github.io/blog/posts/cider-jack-in-to-clojure-cli-projects-from-spacemacs/#2020-02-1219:40Drew VerleeThanks @jr0cket#2020-02-1414:04practicalli-johnnyNew article on raising issues and pull requests for Spacemacs, from with Spacemacs. Includes a video walk through of creating a pull request for the Clojure layer.
https://practicalli.github.io/blog/posts/raising-spacemacs-issues-and-pull-requests/#2020-02-1417:36Bhougland@jr0cket you guides on spacemaces are a huge help to a newbie like me. Thank you!#2020-02-1418:23practicalli-johnnyShould be a lot more videos coming soon, now I have all the broadcasting and recording sorted out.
I take requests for guides and videos (although can't promise a time frame).#2020-02-1420:21BhouglandI love to see an article like this for clojure:#2020-02-1420:21Bhouglandhttps://pawelmhm.github.io/asyncio/python/aiohttp/2016/04/22/asyncio-aiohttp.html#2020-02-1420:22BhouglandI saw some of the API videos you had on your site but haven't watched them all yet#2020-02-1421:01practicalli-johnnyI believe that http-kit has been tested to support 600k request out of the box. I would like to do some load testing content, but it might be a while. Usually the constraints are I/O, like file system or number of database connections.
Running on the Java Virtual Machine is very scalable. I was involved in building a Clojure system that did 30 million transactions a day and the CPU load was 0.03% across 3 servers.#2020-02-1503:15BhouglandThats cool. I created a tool in python based on that blog to interface data from one ERP system into another, but I am trying to "dog food" Clojure so that I get better at it (vs. using python). I just feel like Clojure has so much to offer with core.async, and I even saw a library called Martian that can use Swagger documents to help build your requests. That is too cool.#2020-02-1510:18practicalli-johnnyWe used core.asyc to pump out millions of requests to the enterprise message bus we had to use, Tibco. core.async worked very well even though our uses of Tibco was a bit flawed.
Martian looks an interesting abstraction, thanks.#2020-02-1707:19pithylessThe cider-format-* functionality (on the spacemacs develop branch) is not applying my indent rules specified via define-clojure-indent in the clojure-mode-hook . Is this by-design? Should I be using a different approach? Or perhaps defining it for a different mode? It works if I indent via = in evil-mode. The cider docs seem to only cover the {:style/indent ...} metadata approach.#2020-02-1710:13practicalli-johnnyFrom a quick look at the code, it seems that Spacemacs is calling CIDER without changing anything.
If it's not covered in https://docs.cider.mx/cider/indent_spec.html then probably should ask maintainers on #cider#2020-02-1714:51lread@pithyless, this is a bit of a long shot, but a while ago spacemacs started indenting in unexpected ways for me after moving to the develop branch. The cause was an old stray .editorconfig file, which spacemacs v0.300 now reads, in my home dir. After deleting .editorconfig all was good.#2020-02-1916:22includehi guys! I am having some troubles installing parinfer (https://github.com/DogLooksGood/parinfer-mode#installation) . I don't understand if the correct place to add this (use-package block is under ~/.spacemacs (and where/section) or .emacs.d/init.el .#2020-02-2001:04practicalli-johnny@include parinfer is a layer, just install that https://develop.spacemacs.org/layers/+misc/parinfer/README.html - you will need to be on Spacemacs develop branch (if you are on Spacemacs master then see https://practicalli.github.io/spacemacs/install-spacemacs/ )#2020-02-2009:28includehi @U05254DQM Iām going to test that later today. (yes Iāve cloned develop branch from spacemacs). By the way your explanation is way simpler š thank you very much.#2020-02-2109:34achikinJust updated to the latest develop spacemacs and Iām a bit confused. SPC m brings up sessman instead of the normal major mode menu. Whatās the story behind that? Can I read about it somewhere?#2020-02-2112:10practicalli-johnny@achikin Sorry, I am confused. Are you saying you have a bug or just want to catch-up on the enhancements made to the Clojure layer?
SPC m or , should display the Clojure major mode menu. All details are in the CHANGELOG.develop file and the updated http://README.org file for the Clojure layer.
sesman-start is one entry in the top level of that menu assigned to ' providing a quick way. SPC m m is an additional sub-menu of sesman related commands.
There has been a discussion in this channel and on GitHub about adding keybingings for the missing sesman commands since August 2019.#2020-02-2112:12practicalli-johnnyhttps://github.com/syl20bnr/spacemacs/pull/13215 and the issues / PRs it links to should give you the backstory.#2020-02-2112:12practicalli-johnnyIf you have a bug, please let me know or raise an issue on GitHub and add a link here. Thanks#2020-02-2113:41achikinThank you very much for explanation. I was a little bit confused with sessman and a disappearance of my SPC m ". Now I see that this is not a bug.#2020-02-2113:41achikinThank you very much for explanation. I was a little bit confused with sessman and a disappearance of my SPC m ". Now I see that this is not a bug.#2020-02-2115:45practicalli-johnnyAh yes, I see what you are asking. SPC m ', the sesman-start function, provides a menu for all the jack-in and connect commands in one keybinding. CIDER has similar menus for choosing the dependency tool (assuming you have more than one in the project, eg. leiningen and deps.edn). Also for choosing the clojurescript build tools and deps.edn aliases.
Hopefully this all feels consistent eventually. I appreciate is a little bit of a concern when keybindings move, thats why it took 6 months discussing before the change.
Any feedback on how well this all works within Spacemacs is welcome#2020-02-2119:37plinsIm using integrant/repl to help me with development, and I see myself evaluating (integrant.repl/go) or (integrant.repl/reset) a lot and I wounder how I could create a keybinding that would evaluate this#2020-02-2200:53practicalli-johnny@plins section 12 of this doc should give you the basics (sorry, bit tied up for a proper answer)
https://develop.spacemacs.org/doc/DOCUMENTATION.html#2020-02-2311:54plinsthanks for the directions ... I wonder how Im going to send stuff to cider .. maybe there is some function like (cider-eval-expr 'here-my-expression) that can be called from eLisp#2020-02-2312:02practicalli-johnnyAh, you want to evaluate a cider function from elisp, well as CIDER is writen in elisp then it should be possible, but I dont know enough elisp or cider to do this. Suggest asking on the #cider channel if this is possible and pointers how to do it.
Once you have an elisp function that you can call from your .spacemacs file, then the Spacemacs docs will help you define the keybinding.#2020-02-2312:09practicalli-johnnyIt seems a lot of work, when you could just jump to a buffer with those commands and evaluate. If you are working in the same namespace, then setting a marker would also help, eg. m g and m r then you can use ' g and ' r to jump to the right places and , e f to evaluate. Adding that as a Emacs macro for that could also speed things up and is probably simpler#2020-02-2312:34plinsmaybe this is easier indeed#2020-02-2418:07aisamuhttps://clojurians.slack.com/archives/C099W16KZ/p1582440679011300#2020-02-2418:20plinsthank you sir ;D#2020-02-2601:43Mario C.Ah, I guess I am not the only that was surprised after updating to latest dev.#2020-02-2612:12practicalli-johnnySorry, we only spent 6 months off and on discussing the changes to the Clojure layer in this channel and via GitHub issues and two pull requests labelled as Clojure specific.
I also added a detailed summary to the CHANGELOG.develop and extensively updating the docs to describe how to use the Clojure layer.
Is there anything else I could have done that would help you š#2020-02-2615:31spfeiffer@jr0cket I do not think this was an attack on you. Not everyone follows along here or studies GitHub issues or PRs before doing a git pull#2020-02-2615:52practicalli-johnnyI posted an explanation and a genuine question, I didn't take it as an attack, maybe I should have used more smile's šššššš#2020-02-2617:13practicalli-johnnyI do find it a bit strange that people don't take a minute to check what changes they are going to get before updating. I guess people like the thrill of the unknown :rolling_on_the_floor_laughing::rolling_on_the_floor_laughing::rolling_on_the_floor_laughing::rolling_on_the_floor_laughing::rolling_on_the_floor_laughing::rolling_on_the_floor_laughing:#2020-02-2618:01spfeifferBecause there is no way to know for sure? I update irregularly. Currently i do not know how old my develop branch is locally. I need to check using git log , then compare to the commits made on github, where half of them touch layers i do not use, and half of the other half do not help me because i do not understand the commit message. I am an emacs user, not an elisp developer. Looking at PRs might be easier. But still much effort, for many people, i think.#2020-02-2618:02spfeifferI know what you want to say, but i think for many people, this is too much hassle for little benefit. Normally, things still just work after updatingā¦#2020-02-2619:53practicalli-johnnyI also don't update Spacemacs (or packages) unless there is some benefit.
Although I also update the develop branch when I am working on a pull request, so ensure it can be merged.#2020-02-2617:15practicalli-johnnyIf I were a Machiavellian type of character, I could have great fun putting in things that are unexpected. And it is nearly April, so maybe I should think of an excellent Aprils fools to play...#2020-02-2617:55Mario C.I did exactly that actually. git pull no questions asked. š
BTW I wasn't complaining, I was just surprised that the key-bindings, which are muscle memory at this point, were changed.#2020-02-2619:44practicalli-johnnyI thought I was going to have to change quite a few more keybindings, but after lots of discussion and getting a better appreciation of the overall Spacemacs conventions around keybindings, I managed to keep it to a minimum. Let me know if there any keybindings that seem incorrect, or illogical or especially anything that is missing. Thank you#2020-02-2620:02practicalli-johnnyMy approach to checking what has been updated in Spacemacs is:
1. Open ~/.emacs.d/README.org or any other file in that directory
2. SPC g s to open Magit Status and l l to see the log, noting the title of the most recent commit
3. Review the closed PR's list until I reach the commit in Magit Log, https://github.com/syl20bnr/spacemacs/issues?q=is%3Apr+is%3Aclosed
4. If there aren't any interesting PR's then I dont usually update (unless working on my own PR)
5. If I do need something, then back to Magit status (`q`) in the log and F p to pull the latest changes
6. SPC f e D to check the .spacemacs-template hasnt changed (its fairly static now, but big change between master and develop )
7. Finally update the Emacs packages from the link in the Spacemacs Home buffer, SPC b h and restart SPC q r .#2020-02-2620:05practicalli-johnnyI avoid an update if I have any kind of deadline or do not have time to fix anything (even though that rarely happens).#2020-02-2622:25Mario C.Honestly the only changes to keybindings ive noticed are the , s c which used to clear the REPL buffer and SPC m s s which opens up the repl buffer. Now they are , s l and SPC m s a#2020-02-2700:49practicalli-johnnyThanks, that's useful to know.#2020-02-2707:14plexusI also noticed that , s s is gone? used to use this all the time to switch to the REPL#2020-02-2712:10aisamuIt's now , s a!#2020-02-2712:33plexusDoes that one have a mnemonic?#2020-02-2712:43aisamuIt usually goes , s s -> undefined -> "(a)w, crap".#2020-02-2713:49practicalli-johnnyIts the same keybinding convention as toggling between source and test, i.e. SPC p a and other toggles I found in Spacemacs. The first s in , s s nemonic is send-to, I never found out what the second s stood for.#2020-02-2807:58plexusHmmm so maybe "alternate"#2020-02-2707:17plexusalso pretty bummed that , ' / , " / , & are gone...#2020-02-2707:18plexus@jr0cket what are the mnemonics for , s j j and , s j m? does j and m stand for anything?#2020-02-2713:51practicalli-johnnyWe couldnt agree on what to use, so we used the same as CIDER itself. I beleive j is java and m is multiple (multiple repls) and s is javascript.#2020-02-2717:35Mario C.Is there a way to find a list of commands and look at the mnemonics used?#2020-02-2718:47practicalli-johnnyThese are the conventions that should be applied across all layers for keybindings and other aspects. I had my first PR rejected because it didnt fit the conventions. All the keybindings are in the code, so easily searchable.#2020-02-2710:08achikinDoes anybody use clj-refactor?#2020-02-2710:08achikinIām trying to find usages in cljs code#2020-02-2710:08achikinCall the command#2020-02-2710:08achikinThen the message is shown#2020-02-2710:08achikinTo perform this op the project needs to be evaluated.
Analyzing a large project might take a while: hit C-g to abort.
(Set cljr-warn-on-eval to nil to analyze the project without warning)
Do you want to proceed? (y or n) y
#2020-02-2710:09achikinI press y and nothing happens#2020-02-2710:09achikinNo messages shown, nothing#2020-02-2713:11practicalli-johnny@achikin Assuming you are refactoring a name in a project, I use helm-swoop, SPC s s or SPC s p to search, and helm-ag-edit, C-c C-e and iedit for refactoring, rather than using clj-refactor.
There is work to migrate functionality from clj-refactor to clojure-mode but it needs help. I don't know if there are any plans to fix bugs with clj-refactor itself. I stopped using clj-refactor a while ago as it caused issues irregularly.#2020-02-2713:47achikin@jr0cket benedekĀ Ā [2:05 PM]
no support for cljs in terms of that feature unfortunately#2020-02-2713:48practicalli-johnnyYes, I believe cljs support is poor/non-existing in terms of clj-refactor. I think cljs support is another goal for the cljs-refactor migration (as well as keeping up to date with changes in CIDER itself)#2020-02-2717:09practicalli-johnnyNew PR: https://github.com/syl20bnr/spacemacs/pull/13320
This is adding a function that will jump to the end of the current line and evaluate the last s-expression. Its a function that has been present in Emacs Lisp mode for a long time, so I've also added it to Clojure. It also should negate the need to add any code to change Evil behavior by jumping past the last character on the line.
, e $ or , e l will call spacemacs/cider-eval-sexp-end-of-line and show the results inline in the source code editor (just like , e e or , e f )
Any comments welcome here or on the PR.
Thank you.#2020-03-0119:08practicalli-johnnyThe Pull Request to add , e $ and , e l that calls cider-eval-sexp-end-of-line is now in develop. Enjoy.#2020-02-2717:38Mario C.Is there a way to "marry" two buffers and a way to switch between married buffers? Id like to be able to use one layout, marry buffers, and cycle through them.#2020-02-2813:12aisamuIIUC, that's what workspaces are for (kinda like sub-layouts).
SPC l w ? will show you the available keybindings.
To quickly move between them, there's g t and g T#2020-02-2717:43Mario C.Last question, since I am already on that topic, is there a way to do this; Say you have a window-setup and you focus on a buffer, I would like to focus on it, as in make it the only buffer in the frame but then once I am done with the focus, id like to go back to the previous window set-up. Hope that makes sense#2020-02-2813:14aisamuSPC w m (toggle-maximize-buffer) does precisely that -maximises/restores#2020-02-2718:52practicalli-johnny@mario.cordova.862 not entirely sure I understand your questions, have you looked at layouts?
SPC l menu allows you to create layouts, which will group most commands to just working with the buffers in that layout.
https://practicalli.github.io/spacemacs/working-with-projects/layouts.html
https://develop.spacemacs.org/layers/+spacemacs/spacemacs-layouts/README.html#2020-02-2719:34Mario C.Yes, I use layouts. I was wondering if there was a way I can group buffers within a layout and cycle through those groups#2020-02-2722:26practicalli-johnnyI don't know if its what you want, but you could have a workspace for each buffer in your layout.
Or keep it simple and use SPC b n and SPC b p#2020-02-2813:12aisamuIIUC, that's what workspaces are for (kinda like sub-layouts).
SPC l w ? will show you the available keybindings.
To quickly move between them, there's g t and g T#2020-02-2813:14aisamuSPC w m (toggle-maximize-buffer) does precisely that -maximises/restores#2020-03-0119:08practicalli-johnnyThe Pull Request to add , e $ and , e l that calls cider-eval-sexp-end-of-line is now in develop. Enjoy.#2020-02-2813:37erwinrooijakkersWow so you can create multiple views#2020-02-2813:37erwinrooijakkersI donāt know what it means exactly but I did SPC l 0 to create two named perspectives in different starting state#2020-02-2813:38erwinrooijakkersCan switch between them via SPC l 1 and SPC l 2 or SPC l 0 and pick my named perspective#2020-02-2813:38erwinrooijakkersSo for working in multiple projects at once? And keeping the state separate?#2020-02-2814:03aisamuThe workspaces are contained within a layout, but there's nothing stopping you from having multiple projects per layout.
I'm starting to create layouts per feature, because they usually involve code in 2+ different projects.
SPC l w 1 will jump straight to 1, but you can also go backwards and forwards with g t & g T (workspaces within a layout). Renaming (`SPC w l R`) is also useful when you have lots of those.
SPC b W should change to the buffer and switch to the workspace that contains it, but it doesn't work for me#2020-02-2815:01aisamuOops, important edit: SPC l 1 -> SPC l w 1#2020-02-2814:54practicalli-johnny@erwinrooijakkers SPC l TAB switches to last layout, so makes it easy to toggle between two. Just the same as toggling between two buffers with SPC TAB#2020-02-2814:57practicalli-johnnySPC l l selects a layout by name, or create a named layout of that name does not exist. I find it useful for selection when I have more than 10 layouts (which I often do)#2020-02-2820:18Mario C.@aisamu It's exactly what I was looking for! š#2020-02-2920:19eccentric JIs there a quick way to increase\decrease the font size globally?#2020-02-2921:02practicalli-johnny@jayzawrotny SPC z f zooms the frame, changing the font size for all buffers and the modeline.#2020-02-2921:02eccentric JPerfect, thank you!#2020-03-0120:02practicalli-johnnyIs there anything else missing from the Spacemacs Clojure layer that you think would be useful to add? Thanks.#2020-03-0210:57erwinrooijakkerscider-pprint-eval-last-sexp-to-comment#2020-03-0210:57erwinrooijakkersI would use that one for ,e;#2020-03-0210:58erwinrooijakkersInstead of cider-eval-defun-to-comment#2020-03-0210:58erwinrooijakkersOh actually I see how it works now#2020-03-0210:59erwinrooijakkersYou have to stand in the expression with cider-eval-defun-to-comment#2020-03-0211:00erwinrooijakkersMaybe also a command to clear the repl, not sure if thatās possible#2020-03-0211:01erwinrooijakkersI mean removing all vars#2020-03-0211:01erwinrooijakkersSo you have a clean slate again#2020-03-0211:01erwinrooijakkersNow I use cider-quit and restart#2020-03-0211:01erwinrooijakkersMaybe thereās already a better way#2020-03-0212:36practicalli-johnnyAs of the latest develop branch, there are several ways to remove vars
, e u to undefine a specific var
, e n to refresh the current namespace
, e N or , s q n to reload the current namespace
, s q N to reload everything
, s q r to restart the REPL#2020-03-0212:44practicalli-johnnyI will give cider-pprint-eval-last-sexp-to-comment a try, I had not noticed that command before. I tend to use cider-eval-defun-at-point far more. I only use last-sexp on nested functions, so initially the current , e ; binding seems to fit. However, I will test out the differences this week.
I can always add another binding for that function if there is a good keybinding to use.#2020-03-0212:44practicalli-johnnyThanks for the feedback#2020-03-0214:09aisamuWould it be possible (even if locally) to put the -pprint versions behind a C-u+`regular-command`?#2020-03-0218:06practicalli-johnny@U1UQEM078 interesting. There are a few places where different functions or behaviour is called if you use SPC u before the keybinding, but I havent looked in detail at this.
Certainly would help streamline a few keybindings if we just provided a universal argument to switch.#2020-03-0504:15didibusI'd love if the layer could smartly alter itself between cider and inf-clojure#2020-03-0504:15didibusWell, I'd say low on the priority list, but I think it be a nice to have#2020-03-0509:16practicalli-johnny@U0K064KQV do you have any info on how to use inf-clojure with Spacemacs? Not something I am aware of or have tried.#2020-03-0510:48practicalli-johnnyThere is an outstanding issue on Spacemacs for swappable backends for Clojure. https://github.com/syl20bnr/spacemacs/issues/11014
I havent felt the need for anything other than CIDER, so not on my todo list for a long while.#2020-03-0311:52practicalli-johnnyToday I am enjoying the SPC x t transposing text menu as I hack on the Spacemacs book. Lots of updates last night and more tomorrow :)#2020-03-0515:28jumarWhat's the best way to customize indentation for things like try+ (slingshot) macro?#2020-03-0806:33jumarNobody has these kind of issues?#2020-03-0719:34AleedI just setup spacemacs (used @jr0cket guide/setup, thanks btw!) and Iām trying to get cider repl working with shadow-cljs.
I confirmed it works with a basic clj project, but canāt seem to get code evaluated with shadow. Is there extra configuration or steps required for this?
I do this this warning in repl* console: WARNING: CIDER 0.25.0-snapshot requires 'cider-nrepl 0.25.0-SNAPSHOT, but you're currently using cider-nrepl 0.21.1. The version mismatch might break some functionality! So that might be the cause. But not sure where the cider repl version is specified, I donāt see it in spacemacs init.el file and specifing a specifc version in my projects deps.edn does not seem to change anything.#2020-03-0720:34practicalli-johnny@alidcastano it depends how you are starting the REPL. If you start the REPL outside of Spacemacs, via some shadow-clj command and then using cider-connect from Spacemacs, then there may be a an older version of cider-nrepl somewhere in the shadow-clj project. If you are using cider-jack-in-cljs or cider-jack-in-clj&cljs then it would be very strange to get this error, unless there is something in the shadow-cljs again adding an eariler version of cider-nrepl .#2020-03-0720:35practicalli-johnnyDoes the shadow-cljs project use a Leiningen http://project.cl#2020-03-0720:38Aleedit uses a deps.edn configuration
Iāve tried both ways: cider-jack-in and cider-connect, canāt seem to get it working in either case and in both situations see that warning in the repl console.#2020-03-0720:40practicalli-johnnyif you look in the SPC b m message buffer it should show you the full command that is used to start the REPL from Emacs. Or you can use SPC u before jack-in or connect to check / edit the command used.#2020-03-0720:46AleedSPC b m seems to kill all buffers#2020-03-0720:42practicalli-johnnyIt sounds like the shadow-cljs project has an earlier version of cider-nrepl, which I assume it uses to start an nREPL server so that an editor, such as Emacs/Spacemacs/Cider can connect to.#2020-03-0720:42practicalli-johnnyI am reading through the shadow-cljs docs to see if I can understand what is happening#2020-03-0720:45practicalli-johnnyThis seems relevant, just reading it now https://shadow-cljs.github.io/docs/UsersGuide.html#user-config#2020-03-0720:47Aleedthanks for link, and for looking into it. I did try explicitly specifying a cider-repl version but perhaps I didnāt do it right. will try again#2020-03-0720:48practicalli-johnnyYes, edit the ~/.shadow-cljs/config.edn which I assume is the main config that shadow creates across all your projects. It should have been created the first time you ran shadow-cljs. Put a newer dependency in there
{:dependencies
[[cider/cider-nrepl "0.25.0-SNAPSHOT"]]}#2020-03-0720:49Aleedsince iām using deps.edn along with shadow, I think I need to specify it there. but Iāll try both ways#2020-03-0720:50Aleedah#2020-03-0720:50Aleedthatās a global config#2020-03-0720:50Aleedi do see the wrong version specific there, that must be it! thanks#2020-03-0720:51practicalli-johnnyif you still get a warning, then you could also check ~/.nrepl/nrepl.edn or in the .nrepl.edn file inside the project (I guess at the root of the project).#2020-03-0720:52practicalli-johnnyI havent tried shadow-cljs yet, so let me know if you get it working. I will give it a try one day soon š#2020-03-0720:56Aleedtrying it now, will report back!#2020-03-0721:05Aleedso iām now seeing
`clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.5.0 (package: <tel:202002291105|20200229.1105>) and n/a`#2020-03-0721:06Aleedi also see this in buffer that starts the repl
WARNING: The configured :dependencies in shadow-cljs.edn were ignored!
When using :deps they must be configured in deps.edn
so not sure if global shadow config is used, i think maybe its n/a now because i removed cider from my deps.edn#2020-03-0721:06Aleedwill play around with it to see what works but at least now iām seeing a different warning š
#2020-03-0720:58practicalli-johnnyYou should just be able to cider-jack-in-clj&cljs and evaluate code from within Spacemacs. However, I dont think you are supposed to run the shadow-cljs server if you do jack-in from Emacs, it should run the shadow-cljs server for you.#2020-03-0721:08Aleedyes, when i jack-in i do see the shadow-cljs server running - itās just doesnāt seem to be evaluating the code, which is why Iām trying to fix the version mismatch warning I see in repl console#2020-03-0800:23Aleedcircling back, got it working
what got it working: 1) jack-in to cljs project which also starts shadow-cljs server 2) connect to a specific build instance (write āyā when it asks to connect to a sibling instance) 3) if itās a browser instance have that window open so that the repl can connect and evaluate code in it
thanks for the help#2020-03-0816:58practicalli-johnnyThanks for the feedback.#2020-03-0819:34BhouglandDoes anyone know how to get a Spacemacs theme to color an anonymous function using # the same as defn or the anonymous fn? I am using the tommorow-eighties theme if that matters#2020-03-0916:33niveauverleihI have recently installed spacemacs on my Win7 Pc and on my Android phone (via termux-ubuntu). I would like to know how I can get code completion and how to lookup the clojure docs examples for a given function.#2020-03-0918:26adamfeldmanI highly recommend these comprehensive guides: https://practicalli.github.io/spacemacs/#2020-03-0919:15niveauverleihHi Adam, thanks. Yes, these are great. I read almost all of them. Ironically I just found what I was looking for (SPC m h h etc) on the cider home page, I hadn't scrolled down enough.#2020-03-1007:33niveauverleihHow can I get the source function in Spacemacs/Cider. The documentation says: "SPC m s u require Clojure utils into current namespace - i.e. functionsĀ docĀ source" But I get "SPC m s u is undefined".#2020-03-1010:37spfeifferRecently there were some keybinding updates. Perhaps guide is outdated? You are on develop branch?#2020-03-1011:11niveauverleihI don't think so. I can fetch it. I wanted to try the linter anyway and it seems I need to have the dev branch for that.#2020-03-1014:55David SchmidtIām trying to get clojure to have ājump to definitionā functionality, but cider-find-var doesnāt seem to work for me. I get this error:
Wrong type argument: hash-table-p, nil
Iām on the most recent version of the develop branch and all my packages should be fully up to date. I tried googling the error but didnāt find anything particularly helpful. Any idea what this means?#2020-03-1015:01David SchmidtI think it might have something to do with using cider connect instead of jack-in?#2020-03-1015:27practicalli-johnny@david.schmidt I always use one of the cider-jack-in commands and , g g for cider-find-var seems to work okay. So long as the repl is running it seems to work fine. I havent tried cider-connect for a long time. Are there any errors in the messages buffer, SPC b m ?#2020-03-1016:48David SchmidtI unfortunately have to cider-connect for my development environment to work.
Hereās the error from the messages buffer:
nrepl-dict-from-hash: Wrong type argument: hash-table-p, nil
When doing cider connect and getting this failure, cider-find-var also fails to default back to dumb jump. If I cider-jack-in to another project, definition jumping seems to work, but Iām not sure which handler it used.#2020-03-1017:23practicalli-johnnyDoes evaluating the function definitions you want to find make any difference, or just evaluating the whole source code buffer? I appreciate it does defeat the purpose of find var a little if you have to evaluate the function before finding it. If cider-find-var still doesnt work with the functions evaluated, then is seems something is broken with cider-connect. Probably should raise an issue on https://github.com/clojure-emacs/cider#2020-03-1018:08David SchmidtNo, unfortunately it does not make a difference. Thanks for the help!#2020-03-1015:44practicalli-johnnyI've raised a new pull request to add two keybindings for browsing the clojure.spec specifications of a clojure project, , h s to browse a specific spec and , s S to browse all specs. The functions called have been present for a while but without keybindings. The new keybindings follow the same approach as browsing namespace keybindings.
https://github.com/syl20bnr/spacemacs/pull/13362
(Note: no muscle memory was hurt in the making of this pull request)#2020-03-1316:37practicalli-johnny, h s and , h S for browsing clojure.spec specifications are now part of the Spacemacs develop branch.#2020-03-1015:49Adrian Smithdoes any one know why the parinfer layer might not be working? https://github.com/syl20bnr/spacemacs/issues/13350#2020-03-1016:15practicalli-johnnyLooks like nothing has changed with par-infer layer for a year and a half https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Bmisc/parinfer/packages.el
The parinfer layer defines the SPC t P keybinding, so when the layer is not included, then that keybinding does not exist.
I cannot see any obvious commits or PR's to Spacemacs that would have broken the parinfer layer. I would have assumed it would be some updates to Vim or Evil related packages that have broken something, or perhaps the parinfer package relies on something that has been depreciated or removed. The parinfer layer seems to do very little, except pull in the parinfer package and set it to indent mode, adding a keybinding and enabling a toggle action.#2020-03-1016:18practicalli-johnnyAn alternative to parinfer is to use agressive indenting and align form https://practicalli.github.io/spacemacs/improving-code/formatting/ which doesnt need any additional layers#2020-03-1020:32pabloreIs anyone here using the rust-parinfer plugin instead of the parinfer layer?#2020-03-1020:33pabloreI use it on vim and find that it works better than the version of emacs. But I havent been able to install it on my spacemacs configuration#2020-03-1020:33pablore(Itās supposed to work on both emacs and vim)#2020-03-1022:03didibus@pablore If you like parinfer, I recommend you try adjust-parens-mode + aggressive-indent-mode combo#2020-03-1022:04didibusIts parinfer like, but I find it a superior experience#2020-03-1022:05didibusBasically, it always formats everything automatically as you type, and you press TAB or C-TAB to indent/dedent which will also adjust parenthesis accordingly#2020-03-1022:12didibusHere's a demo#2020-03-1316:37practicalli-johnny, h s and , h S for browsing clojure.spec specifications are now part of the Spacemacs develop branch.#2020-03-1100:50didibusHow do you delete the surrounding sexp, but keep the inner ones?#2020-03-1100:50didibuswith smartparens ?#2020-03-1100:50didibusLike say I have:
(do (foo)
(bar)
(baz))
and I want:
(foo)
(bar)
(baz)
#2020-03-1100:52didibusWhat I do now is sp-unwrap-sexp which gets rid of the outer parenthesis, and then I manually delete do. But is there a command that would also delete do ?#2020-03-1109:43practicalli-johnny@didibus SPC k r on a child (nested) expressions will replace the parent expression with the child. Unfortunately this will kill any other child expressions, so not quite what you want š#2020-03-1111:01shan(do |(foo)
(bar)
(baz))
with my cursor before (foo) if I do SPC k E it should give what you want#2020-03-1115:43zaneDoes anyone else find it awkward to insert an org-mode link at the end of a line? Since links get inserted before the point, and since you must be in normal mode to insert a link, the only way I've come up with to insert a link at the end of a line is:
1. a to enter insert mode after the current character
A link:
^
2. <SPC> to add a placeholder space
A link:
^
3. <ESC> to enter normal mode, with the cursor on the placeholder space
A link:
^
4. ,il to run org-insert-link
A link:
^
5. x to delete the placeholder space
A link:
^
Curious whether anyone else has a better way.#2020-03-1116:28practicalli-johnnyI usually type the text of the link first, then use v or SPC v to highlight that text. Then , i l after I enter the URL the link text is already populated, so I just press RET .#2020-03-1116:49zaneGot it. Do you have a similar workflow for when you want the text to be the title of the webpage?#2020-03-1116:50zanei.e. org-cliplink-like behavior#2020-03-1214:47practicalli-johnnyI've never used that function, seems handy though. If its in the body of a text, I would just create an extra space before using it. Or if I forgot, insert the link without the space and use F [ to jump back to the start and i to insert a space.#2020-03-1216:17Aleedhow do you add a local theme to spacemacs?
I tried adding a theme file to ~/.emacs.d/private/local/themes/[name]-theme/[name]-theme.el butt the theme is not getting picked up.#2020-03-1218:01telekid@zane you can also try (setq evil-move-beyond-eol t)#2020-03-1223:14zaneOh, sick. Thanks, Jake!#2020-03-1218:02telekidthis also makes cider-eval-last-sexpr more useful#2020-03-1221:16Drew VerleeHow do you update your current environment variables. I can edit them, but i need the current buffer/whatever to use them š#2020-03-1221:57practicalli-johnny@drewverlee if you are on Spacemacs develop then
SPC f e e opens the spacemacs.env file that has all of the environment variables that Spacemacs picks up on startup. You can edit this file and make changes.#2020-03-1221:58practicalli-johnnyIf you edit environment variables via your operating system, then you will need to restart Emacs#2020-03-1222:06Drew VerleeOh, then maybe it's working already.#2020-03-1222:06Drew VerleeThanks#2020-03-1303:28Bhougland@jr0cket How can I get an anonymous function using #( to get highlighted like defn or even fn for that matter?#2020-03-1303:38BhouglandTo clarify, I want the pretty symbol highlighted#2020-03-1303:44practicalli-johnny@benjamin.hougland If I understand the question correctly, I believe you would need to find out what face it was using and modify the theme you are using for Emacs to highlight that face.
Place the cursor over the fancified character and SPC SPC describe-face (I think). If it has aface, you could use SPC SPC customize to change that face. If the face is used by other things you don't want highlight, then that's not going to work.#2020-03-1303:51practicalli-johnnyOr maybe hack the substitution code that fancify-symbols uses https://github.com/syl20bnr/spacemacs/blob/master/layers/%2Blang/clojure/funcs.el
I don't have a good answer for that I am afraid.#2020-03-1316:42practicalli-johnnyWhen updating the Spacemacs develop branch you may notice a change to the ordering of the which-keys menu. This does seem put all the most important keybindings first.
If you wish to switch back the the previous ordering of which-key menus, add the following to the dotspacemacs/user-config section of your .spacemacs or .spacemacs.d/init.el file
(setq which-key-sort-order 'which-key-key-order-alpha)
#2020-03-1515:10HojatHi every one
I'm completely new to emacs, spacemacs, even vim and linux
I'm trying to do my daily work in spacemacs, that's JavaScript and react
I have a few questions:
1. Why all documentations is based on users that have all these knowledge?
2. For example for configuring js-mode there's a package import-js that can be used. Should I install the npm package or install the package from spacemacs? What else should be done?#2020-03-1516:27practicalli-johnnyEach programming language has a layer with documentation for any configuration, although usually very little or no additional config is required.
https://develop.spacemacs.org/layers/LAYERS.html
It is highly recommended that you use the Spacemacs develop branch.
Try the Gitter chat for a wider range of people to help. This channel is predominantly focused on using Clojure with Spacemacs.
https://gitter.im/syl20bnr/spacemacs#2020-03-1516:38HojatTy @U05254DQM#2020-03-1516:42practicalli-johnnyThe most up to date info for any layer is always in the Spacemacs GitHub repository https://github.com/syl20bnr/spacemacs
It seems a lot of languages are moving to a Language Server Protocol tooling, so that maybe something new you need to learn, but it should be covered in the Readme file of each layer.#2020-03-1516:43practicalli-johnnyI also have an online book that may help you learn Spacemacs. It's partly about Clojure, but there are a lot of general topics covered, especially learning vim
https://practicalli.github.io/spacemacs/#2020-03-1914:52bmaddyOn occasion I'd like to use include alias that's not specified in the .dir-locals file for a project that uses clojure's cli tools. Is the best way to do this to figure out the right version of nrepl, piggieback, etc., put all that stuff in my ~/.clojure/deps.edn file (and update it whenever things get updated in spacemacs), then use cider-connect-clj&cljs?#2020-03-1916:52bmaddyGot it: SPC-u SPC-SPC cider-jack-in (or whatever your jack-in command is). Then, you'll have the option to edit the command it runs. Unfortunately, you can't append another -A on the end to add your alias, you'll need to go back and modify the one that's already there.#2020-03-1918:24practicalli-johnnyIf you are using cider-jack-in rather than cider-connect then CIDER will manage the nrepl depenencies on startup. Its only for cider-connect you would need an alias.#2020-03-1918:25practicalli-johnnyclojure -A:you:can:use:multiple:aliases in the clojure command#2020-03-1918:41bmaddyYeah, adding nrepl dependencies is why I use cider-jack-in. I'd really like to be able to include my custom sc alias from ~/.clojure/deps.edn for vvvvalvalval/scope-capture. That's not in the .dir-locals.el file for our project, but I'd like to add it sometimes when doing debugging. After re-reading my question, I see how it wasn't very clear now.#2020-03-1918:26zaneIs it just me or was there recently a change that bound [ to evil-cp-previous-opening, thus clashing with evil-unimpaired?#2020-03-1918:44practicalli-johnny@zane the [ on my develop branch is defined in the evil-cleverparens package, which has not changed since 2017. Looking at the spacemacs-evil and clojure layers, nothing in there sets a [ keybinding. Some other layer you use could be over-riding it. I havent used the [ keybinding much though.#2020-03-1919:02zaneGot it. That's helpful @jr0cket. Thanks!#2020-03-1922:05plinson the development branch, if I do cider-jackin-clj it prompts me to choose between lein and clojure-cli
is there a variable I can set a default option?#2020-03-2010:51practicalli-johnnyI've asked this in the #cider channel, as the config I have tried does not seem to be picked up by Cider.#2020-03-2011:11practicalli-johnny@plins create a .dir-locals.el file in your project and paste this code inside
((clojure-mode . ((cider-preferred-build-tool . "clojure-cli"))))
This will set the Clojure CLI tool as the default and wont prompt you to choose for that project.
SPC p e will also help you create your own .dir-locals.el file and list the possible variables you can add.#2020-03-2013:59plinsthank you for detailed explanation#2020-03-2311:44aisamuSPC p e š !!!#2020-03-2011:13practicalli-johnnyDefault aliases can also be set using the .dir-locals.el file, eg.
((clojure-mode . (cider-preferred-build-tool . "clojure-cli")
(cider-clojure-cli-global-options . "-A:cljs-jvm:dev:unit-test")))
#2020-03-2011:17practicalli-johnnyYou will need to reload a buffer from the project or restart Emacs for the .dir-locals.el to be picked up. You should see a prompt to confirm you want to apply the contents of the file, as is elisp code.#2020-03-2316:29OrdoFlammaeI'm getting odd errors when I use namespaces with numbers in them, and try to evaluate stuff with spacemacs cider-eval-last-sexp. Does anyone know how to fix this?#2020-03-2316:30OrdoFlammaeAn example is using the namespace advent-of-code-2019.01-fuel.#2020-03-2316:30OrdoFlammaeBut working in the namespace advent-of-code-2019 works fine.#2020-03-2316:31OrdoFlammaeThe errors look like this: Namespace '-fuel' not found.#2020-03-2318:46practicalli-johnny@olieidel_old Does the source code file containing the 01-fuel namespace use the underscore? i.e. 01_fuel ?
Java Classpath does not like dashes in filenames.#2020-03-2318:47OrdoFlammaeYeah, the filenames are all good.#2020-03-2318:47OrdoFlammaeThe filename is 01_fuel.clj.#2020-03-2318:47OrdoFlammaeIn the directory advent_of_code_2019.#2020-03-2318:48OrdoFlammaeLike I said, it works fine if I have only one distinct number in the namespace.#2020-03-2318:48OrdoFlammaeAlso, as an aside, I didn't actually move the file to a different namespace, I just renamed the namespace in the file.#2020-03-2318:48practicalli-johnnyStrange, I have lots of files with a similar format and havent noticed a problem https://github.com/practicalli/four-clojure/tree/master/src/four_clojure#2020-03-2318:49OrdoFlammaeIt's only an issue when I try to read it with CIDER, which makes me think that it's a CIDER bug, and I was wondering if there's a workaround or something.#2020-03-2318:49OrdoFlammaeThe REPL works fine.#2020-03-2318:50practicalli-johnnyI am using CIDER with no problems. Maybe the old name is still in the CIDER repl. Did you unevaluate the namespace or restart the CIDER repl after changing the namespace name?#2020-03-2318:51OrdoFlammaeI've restarted Spacemacs a lot.#2020-03-2318:51OrdoFlammaeBut your namespaces don't fit the criteria for failing.#2020-03-2318:52OrdoFlammaeIt only happens for me when I have two distinct numbers in the namespace.#2020-03-2318:52OrdoFlammaeSo advent-of-code-2019 works find, but advent-of-code-2019.02-fuel doesn't.#2020-03-2318:52OrdoFlammaeI'm going to look around on the CIDER github issues page.#2020-03-2319:06OrdoFlammaeXD, I just found the bug report. It's slightly different than the trouble I was experiencing, but it's the same thing. It got fixed 2 days ago, but I guess I haven't updated Spacemacs since then.#2020-03-2319:06OrdoFlammaehttps://github.com/clojure-emacs/cider/issues/2821#2020-03-2319:13practicalli-johnnyOkay, so you just need to update packages, no need to update Spacemacs itself.#2020-03-2319:29OrdoFlammaeXD, I meant update packages. Thanks for the help.#2020-03-2515:43practicalli-johnnyI added a troubleshooting guild to my Spacemacs book, to highlight some simple things you can do if you are having issues with Spacemacs. I also linked to the very useful Spacemacs debugging guide, to help you get more information when reporting issues.
https://practicalli.github.io/spacemacs/install-spacemacs/troubleshooting.html#2020-03-2522:03OrdoFlammaeIs there a way to pretty-print the value of a variable in comments, sort of like REPL evaluating, in spacemacs?#2020-03-2601:49practicalli-johnny@ordoflammae , e p will pretty print into a new buffer, The contents could then be copied into your source code buffer and put in as a comment. Select the expression and press g c to comment it.#2020-03-2601:51practicalli-johnnyYou can also do SPC SPC cider-pprint-eval-defn-to-comment and same for last-sexp. If I can think of good keybindings, I can add them...#2020-03-2602:06OrdoFlammaeOK, that last function was what I was asking for. I can just assign that to some keybinding.#2020-03-2602:06OrdoFlammaeThanks.#2020-03-2602:09practicalli-johnnyWhat keybinding in the Clojure major mode menu would make sense in your opinion? I would like to add it to Spacemacs.#2020-03-2602:10OrdoFlammaeProbably , e p ;. I'm not super experienced with Spacemacs, but that seems natural.#2020-03-2602:12practicalli-johnnywhich would you use more, cider-pprint-eval-defn-to-comment or last-sexp version ??#2020-03-2602:13OrdoFlammaeI don't know. I'm trying to research the difference.#2020-03-2602:14OrdoFlammaeI don't understand the difference between the eval-defn family of commands and the last-sexp family.#2020-03-2602:14practicalli-johnnyI tend to prefer defun, that is what , e ; uses for the non pprint version#2020-03-2602:15practicalli-johnnydefn evaluates the top level expression (the parent form), last-sexp evaluates the expression/form before the cursor (or on the previous line).#2020-03-2602:16practicalli-johnnyI find last-sexp most useful for evaluating expressions nested inside other expressions#2020-03-2602:16OrdoFlammaeAh. I'd probably use the defn version then.#2020-03-2602:16practicalli-johnnythanks, good to get some feedback before making changes š#2020-03-2602:17OrdoFlammaeThe cider docs don't seem to be very informative on the different functions, do you have any suggestions on where I can go to find information on the different cider functions in emacs?#2020-03-2602:18practicalli-johnnyWell you could read my book š One day it will be finished, but hopefully has enough to help you https://practicalli.github.io/spacemacs/#2020-03-2602:18OrdoFlammaeYeah, that's where I've gotten all the information I have.#2020-03-2602:19practicalli-johnnyI am updating it fairly regularly at the moment, often from questions posed here#2020-03-2602:19OrdoFlammaeI've also been having trouble with CIDER putting the result-comments on the same line as the expression sometimes, do you know how to fix that?#2020-03-2602:20practicalli-johnnyIt seems to do that when no new line is below the code you are evaluating, i.e. at the end of the file.#2020-03-2602:20practicalli-johnnyEither create a new line or use C-j as the start of the comment to move it to the next line#2020-03-2602:21OrdoFlammaeOK, thanks for the help.#2020-03-2602:28practicalli-johnnyHello everyone, I am considering a pull request to add some more pprint keybindings. Feedback is appreciated
"e;" 'cider-eval-defun-to-comment
"ep;" 'cider-pprint-eval-defun-to-comment
"epf" 'cider-pprint-eval-defun-at-point
"epe" 'cider-pprint-eval-last-sexp
"epE" 'cider-pprint-eval-last-sexp-to-comment
Thank you#2020-03-2612:44zaneI would absolutely love this.#2020-03-2616:23practicalli-johnnyIts already a PR#2020-03-2622:27zaneYou're the best!#2020-03-2711:46practicalli-johnnyThe PR is https://github.com/syl20bnr/spacemacs/pull/13421 (I had to push an amended commit, so it may take a few days to be cherry picked into Spacemacs)#2020-03-2602:30OrdoFlammaeIsn't , e ; already implemented?#2020-03-2612:46zaneI believe , e ; currently runs cider-eval-defun-to-comment. It looks like he's proposing moving that to e; and replacing it with cider-pprint-eval-defun-to-comment. Emphasis on the pprint.#2020-03-2607:57practicalli-johnnyYes, just included for context#2020-03-2610:46kszaboThis function is pretty useful to me, might be worth adding:
(defun cider-eval-parent-sexp ()
"Evaluate the immediate parent sexp"
(interactive)
(save-excursion
(sp-end-of-sexp)
(evil-jump-item)
(cider-eval-sexp-at-point)))
(spacemacs|forall-clojure-modes m
(spacemacs/set-leader-keys-for-major-mode m
"e." 'cider-eval-parent-sexp))#2020-03-2611:17practicalli-johnny@thenonameguy could you provide some examples of when you would use this function?#2020-03-2611:18kszabo#2020-03-2611:18kszabohere I had it mapped to , e (#2020-03-2611:18kszabobut itās the same fn#2020-03-2611:19kszaboessentially, you can evaluate the surrounding sexp, without having to navigate to the end/beginning#2020-03-2611:20kszabobut I moved the keybind to , e . since itās more comfortable#2020-03-2611:20practicalli-johnnyIs this different to , e l or , e $#2020-03-2611:21kszaboyes, because those operate on lines, this operates on the AST#2020-03-2611:21kszabotry invoking them on this example#2020-03-2611:21kszaboand you would get + evaled and (+ 2 .2) evaled#2020-03-2611:21kszabonot the surrounding sexp#2020-03-2611:25practicalli-johnnyOkay, thanks. I will give it a try on my own setup.#2020-03-2611:26kszaboCheers, it reduced my navigation by quite a bit#2020-03-2612:02teodorluAlternative: setting C-c C-c to evaluate toplevel expressions inside comments.
Thoughts on what would be most sane to use?
(setq clojure-toplevel-inside-comment-form 't)
#2020-03-2612:47zaneI've been wanting this for ages.#2020-03-2613:26kirill.salykinThank you so much!#2020-03-2614:15kszaboThis should be included with the clojure layer IMO#2020-03-2615:22plins+ 1#2020-03-2612:02kszabothat actually makes a lot of sense#2020-03-2613:48zaneAnyone else have an issue where , t t doesn't always show the results in the minibuffer?#2020-03-2613:49zaneI'm finding that sometimes the test result gets hidden by what looks like an evaluation result.#2020-03-2613:49zaneSo I have to , t b to see the test result. š#2020-03-2614:14kszaboyes, it would be nice to fix#2020-03-2614:14kszabohad this for ages#2020-03-2614:48kirill.salykin+1#2020-03-2615:37Mario C.Any idea why Spacemacs becomes awfully slow when setting (set! *warn-on-reflection* true) ?#2020-03-2616:23practicalli-johnnyIs it Emacs or is it adding more overhead for Clojure? Are you actually getting reflection warnings?#2020-03-2616:24Mario C.I am getting reflection warnings but I think this has more to do with CIDER than anything. Once I close the repl everything is fast again.#2020-03-2616:29Mario C.Also is there an "inverse" for the go-to definition function?#2020-03-2616:29Mario C.As in find all places where this function is called#2020-03-2617:04plins, r f u -> find usages#2020-03-2617:18Mario C.@plins I dont have those key mapping#2020-03-2617:19plinsyou need to enable clj-refactor#2020-03-2617:19plinsare you using master or development branch? o the dev branch it comes with the clojure layer already (if Im not mistaken)#2020-03-2617:20plinson .spacemacs at dotspacemacs-configuration-layers change the clojure layer to this config and the bindings should show up
(clojure :variables
clojure-enable-linters '(clj-kondo)
clojure-enable-clj-refactor t)#2020-03-2617:21plinsif you are not using clj-kondo (its a linter, no related to your question but any way..) I strongly advise you to do so, once again, its very easy to setup, just install it on your machine , add that line to .spacemacs and should be working#2020-03-2617:36Mario C.clj-refactor was causing issues so I had uninstalled it. But let me give it a go and see if its still wonky#2020-03-2617:36Mario C.I am using the dev branch#2020-03-2617:46practicalli-johnny@mario.cordova.862 or you could use the Emacs tools, eg. SPC s p followed by C-c C-e to put all the results in a buffer#2020-03-2617:48practicalli-johnnyI use this approach to refactor names across a project, eg. https://practicalli.github.io/spacemacs/refactor/within-a-project.html#2020-03-2617:50Mario C.Would this catch instances of calling a function with a namespace prefix such (my-ns/function-name args) ?#2020-03-2617:52practicalli-johnnyYes, its a text search, so it will match what ever you search for. It doesn't rely on the REPL or static analysis.#2020-03-2617:53Mario C.Ah, well I could just use SPC / this works relatively well. Although for some odd reason its returning results for files that should be ignored#2020-03-2617:56practicalli-johnnyWith either keybinding you can pass arguments to the search. If you have ripgrep binary installed, they you can pass search arguments `-g*.clj` to just search *.clj files, or `-g!*.md` to exclude searching *.md files#2020-03-2617:57Mario C.I was under the assumption that SPC / will search all files in project but will ignore files that are set in the .gitignore file.#2020-03-2618:00practicalli-johnnyYes, it should do, although I stopped using that keybinding as it has a few annoyances (weird vim things if you forget to press RTN, have to clear the search highlighting by deleting it).#2020-03-2618:00practicalli-johnnyHere are some examples of using the option with a search https://practicalli.github.io/spacemacs/working-with-projects/searching-projects.html#2020-03-2618:01practicalli-johnnyI recommend installing ripgrep or at least silver-searcher (ag) if you havent already, they are much faster and more reliable than grep.#2020-03-2618:23Mario C.Yes, I use the silver searcher#2020-03-2618:23Mario C.Thanks @jr0cket#2020-03-2618:24practicalli-johnnyI think clj-refactor is a bit more reliable than it used to be, however, I found I haven't missed it over the last year. It's good to have options š#2020-03-2618:33plinsfor it would be worth it just for the clear namespace function#2020-03-2618:57kszaboalso thread-first/thread-last refactorings#2020-03-2908:20practicalli-johnnyThreading refactoring is already part of clojure-mode, so clj-refactor is not needed for that. In fact I just used thread-last refactor yesterday thanks to your reminder about it.#2020-03-2908:22practicalli-johnny@plins could you clarify what clear the namespace does? I assume you mean remove (undefine) the definitions in the current namespace. I thought that was part of CIDER itself (I could be wrong).#2020-03-2921:51kszabohttps://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-clean-ns#2020-03-3011:54plinsI think its part of CLJR, also besides removing the unused requires/definitions I think it also sort the requires in alphabetical order#2020-03-3013:01practicalli-johnnyOh yes, I looked at the link. That refactor command does more than I would want it too personally. I prefer to group dependencies and requires by their purpose rather than how they are spelt. For unused requirements, then clj-kondo has that covered and is my preferred approach, as I prefer to learn by making those changes myself. However, thats just my approach and its interesting to know how others work.#2020-03-2618:30Mario C.I never really used it. I need to discipline myself to use more of the structural editing. starting getting into the habit of using spc k r, spc k t, spc k c . These keybindings are powerful#2020-03-2622:29zaneSPC k r is one of my most-used keybindings in Lisp languages.#2020-03-2622:29zaneI still struggle to find a use for SPC k c. š#2020-03-2618:30Mario C.not those specific but all of them in general#2020-03-2618:35practicalli-johnnydoes ag have the same -g options for specifying patters? I know it can do the same, just cant remember if the option names are the same.#2020-03-2618:38Mario C.It does actually#2020-03-2618:45practicalli-johnnyIf SPC / is not working as expected, you could always rebind it to another command, e.g in dotspacemacs/user-config addd this expression to use helm swoop (evil-leader/set-key "/" 'helm-swoop)#2020-03-2919:46eccentric JWorking on some small, fun side projects today with lumo. What's the best way to connect to a lumo repl in cljs? I found a few github issues on various projects but they're a few years old so I'm curious if one of those options has caught on.#2020-03-2921:00eccentric JMore research suggests the best way is to run either a lumo socket repl or inferior lisp. How do I install inf-clojure?#2020-03-2921:39eccentric JGot it working! Added inf-clojure for dotspacemacs-additional-packages and used inf-clojure-connect as well as inf-clojure-minor-mode in my cljs buffer.#2020-03-2921:39eccentric JThanks to @U04V15CAJ for the missing pieces here.#2020-03-3114:02JoeHi, In clojure mode my ', e' menu seems to be missing few options mentioned here https://practicalli.github.io/spacemacs/evaluating-clojure/.
I have cider-eval-buffer, last-sexp, defun-at-point, and a couple of others, but not the one which outputs the results as a comment (, e ; in the link) and not the two that print to a new buffer.
Am I missing a plugin or is this some custom configuration?#2020-03-3114:15OrdoFlammae@allaboutthatmace1789, my spacemacs config had , e ; straight off, so I'd double check your list of plugins.#2020-03-3116:01practicalli-johnny@allaboutthatmace1789 my first guess is you are on Spacemacs version 0.200, rather than version 0.300 by switching to the Spacemacs develop branch.
Most people are on develop branch. If you need to switch... https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html#2020-03-3116:12Joe@jr0cket I am on 0.200, thanks!#2020-03-3116:52Joe(I also had to upgrade from emacs 25 to 26, otherwise I got errors downloading packages)#2020-03-3118:06practicalli-johnny@allaboutthatmace1789 Emacs versions earlier that 26 require an updated key, but its a better to use Emacs 26.3 if you can anyway. Emacs 27 should be out this year
There are a lot new features and keybindings in the Clojure layer when using the develop branch, they are covered in the https://github.com/syl20bnr/spacemacs/tree/develop/layers/+lang/clojure readme (which I updated recently so let me know if you have any questions)
Hopefully the rest of the book should also help, but feel free to ask about anything you dont understand.
Thanks.#2020-03-3118:34OrdoFlammaeI'm trying to get Spacemacs working with a boot webserver that I set up from the modern-cljs tutorial. How can I get CIDER to jack in cljs in the correct way?#2020-03-3118:34OrdoFlammaeIf someone could at least point to some documentation or something.#2020-03-3118:36OrdoFlammaeI can't just use cider-jack-cljs with the default boot option because it fails with a null pointer exception.#2020-03-3118:41practicalli-johnny@ordoflammae I thought that CIDER could start a repl from Boot, with just a working boot.build file, however its been so long since I did boot stuff.
Otherwise, if you can start a boot on the command line, then this section should help you connect to a Boot repl from CIDER https://github.com/syl20bnr/spacemacs/tree/develop/layers/+lang/clojure#connecting-to-a-clojure-repl-outside-of-emacs (sorry, after reviewing this seems a little dated now, especially if using Spacemacs develop)#2020-03-3118:42practicalli-johnnyOne thing to watch out for is versions of libraries you are including, they may need to be changed to newer versions (you may see warnings in the repl buffer)#2020-03-3118:45practicalli-johnnyActually it seems this is a better guide for Boot https://docs.cider.mx/cider-nrepl/0.24/usage.html#_via_boot#2020-03-3119:00OrdoFlammaeOK, thanks @jr0cket. I found a few resources, so I'll see if I can get it to work.#2020-03-3119:15practicalli-johnnyLet us know if you find something that works and I'll update the Spacemacs Clojure docs. Thanks#2020-03-3121:02OrdoFlammae@jr0cket, I don't know why it wasn't working, since when I replicate everything from the terminal it works fine, but I fixed it by changing my default boot target to my custom dev task, rather than the default repl -s -b localhost wait. I'm not sure why the second didn't work in Spacemacs, since it worked fine in the terminal, but I wanted to use the custom task anyway.#2020-03-3121:02OrdoFlammaeAlthough, now I have all default boot targets set to dev, is there a way to only set the default boot target for a certain project?#2020-03-3121:02OrdoFlammaeThe variable is cider-boot-parameters#2020-03-3122:20practicalli-johnny@ordoflammae I am assuming there is some CIDER variable you can set, using a .dir-locals.el file. Try SPC p e and see if there is an obvious variable to set for boot. Or search for the variable name on http://docs.cider.mx or ask on #cider channel (it's past my bedtime now)#2020-04-0115:58practicalli-johnnyI've raised a PR to add keybindings for Easy PG, the build in tool in Emacs to encrypt/decrypt files with PGP https://github.com/syl20bnr/spacemacs/pull/13444 If there are any other things to add, let me know on the PR or as a threat to this post. Thank you.#2020-04-0116:01practicalli-johnnyIf you use layouts, then I also created this PR today to update the layouts documentation https://github.com/syl20bnr/spacemacs/pull/13443 I also explain the options for killing buffers when killing a layout with SPC l x .#2020-04-0312:39teodorluI might have found a bug in the syntax highlighter. Can anyone else reproduce?
def-ed strings with quotes seem to be interpreted as docstrings.#2020-04-0312:43OrdoFlammaeYeah, that happens for me too.#2020-04-0320:33mafcocincoHaving trouble with Spacemacs. Has been working great for the last 2 years or so but today, for some reason, my *cider-repl* buffer stopped launching for no reason that I have been able to discover. I've tried multiple launching different projects, thinking maybe there was something in the configuration of a specific project, which did not work. I've tried creating a new project, which also did not work. I moved my previous .emacs.d folder to a backup location and create a fresh install of Spacemacs but no luck. Here is the tall end of the *Messages* buffer for the fresh install#2020-04-0320:33mafcocincoDone (Total of 1 file compiled, 2 skipped)
(Spacemacs) --> installing package:
#2020-04-0320:33mafcocincoMany of these warnings or errors I have seen before things went sideways today. Not sure if they are relevant to what is happening.#2020-04-0320:34mafcocincoThe nrepl-server launches successfully. I just don't get any *cider-nrepl* buffer connected to it. š#2020-04-0322:21practicalli-johnny@mafcocinco The info from your message buffer suggests you have re-installed Spacemacs, or change Emacs versions or changed from develop to master branch (or vice versa). Specifically these lines
(Spacemacs) --> installing package:
#2020-04-0322:24practicalli-johnnyOr it could be that you have updated packages after a while, as 155 packages is quite a lot in one go. My monthly package upgrades only have about 20+ packages#2020-04-0400:40mafcocincoIt was this. I had not upgraded in some time.#2020-04-0322:24practicalli-johnnyHave you changed anything recently?#2020-04-0322:25practicalli-johnnyIt doesnt seem like Emacs was restarted after all those 155 packages were updates, so that would be the first thing to try.#2020-04-0322:27practicalli-johnnyYou seem to have a newer (probably newest) version of CIDER, as the messages say its adding nrepl 0.7.0. I am only running 0.6.0 and I did upgrade my packages not that long ago.#2020-04-0322:47practicalli-johnnyI just installed the latest clojure-mode package via the link on the Spacemacs Home buffer and ran a repl. The repl runs find and I can open the repl buffer and see that its connected. The only difference is that I am not using clj-refactor, so I do not have the nrepl-refactor library injected when I run the repl. So yo uhave the extra [refactor-nrepl\ \"2.5.0\"\] library injected. CIDER occasionally has issues with clj-refactor, but that is usually with older versions of both libraries and you are running new versions.#2020-04-0322:48practicalli-johnnyI suggest removing clj-refactor from the clojure layer in your .spacemacs config and see if that narrows down the issue, if a restart of Emacs did not fix the issue.#2020-04-0403:51mafcocinco@jr0cket thanks for the suggestions.#2020-04-0408:42practicalli-johnny@mafcocinco sorry, I didn't read the whole description last night, you did say you re-installed Sapcemacs. Did you do a diff between your .spacemacs file and the template. If it's been 2 years since an update there will be changes. Or you could just move/remame .spacemacs and restarting Emacs will create a new one for you.
If you are using the default Spacemacs master branch, version 0.200, then there may be bugs that are only fixed in develop. If you would like to try develop (which most people run) then here is a switching guide https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html
Be aware that there are a few keybing updates, so check the Readme first before upgrading https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Blang/clojure/README.org#2020-04-0408:44practicalli-johnnyBefore changing anything with the Spacemacs / Emacs setup, I always check I can run projects via a command line repl. If it does work their, it's not going to work in CIDER.#2020-04-0505:53johanatanDoes anybody use spacemacs from terminal and have it integrated with Mac OS X clipboard? Is this even possible?#2020-04-0507:37spfeifferI think there is some osx layer/package. But i am on linux, no deeper knowledge.#2020-04-0507:39johanatanOh, Iām pretty sure that only works in windowed mode #2020-04-0507:39johanatanI recently switched from windowed to terminal and lost the behaviour hence the question #2020-04-0507:43spfeifferAh ok, sorry.#2020-04-0507:44spfeifferI am sure there are many mac users in here who might be more helpful.#2020-04-0601:30didibusAnyone know how I would override a spacemacs binding?#2020-04-0601:31didibusLike say I want to change what SPC m s L does?#2020-04-0601:31didibusI used to just call define-key over the same keymap and it would work, but with today's update, it seems it no longer does. So I'm thinking maybe I wasn't doing it the proper way#2020-04-0604:17didibusFound it, you need to use spacemacs/set-leader-keys-for-major-mode#2020-04-0609:01practicalli-johnny@didibus could you share what you want to switch the keybinding to and why you find that a useful alternative? Thanks.#2020-04-0918:19didibusYa, I want to change s L for clojure major leader so that instead of clearing the repl output, it clears the REPL buffer#2020-05-0822:02Drew Verleedare i hope it has its own internal version of top?#2020-05-0822:27practicalli-johnny@drewverlee SPC a p and SPC a Plist processes, the first being specifically from Emacs. Can't remember if it shows resources. There is the debug guide https://github.com/syl20bnr/spacemacs/wiki/Debugging
SPC SPC helm-top runs top
This might be a useful guide https://www.emacswiki.org/emacs/EmacsMemoryDebugging#2020-05-0822:30practicalli-johnny@zane nothing has changed on the Spacemacs side for testing for a long time from what I remember Things may have changed in cider, but I don't recall.#2020-05-1020:07dev.4openIDGoing to https://github.com/syl20bnr/spacemacs#alternate-installations; I wish to install spacemacs in the alternative location of .emacs.d/spacemacs. folder
In the doc it states:
mkdir ~/spacemacs
git clone ~/spacemacs/.emacs.d
HOME=~/spacemacs emacs
The mkdir and git are done (with the appropraite paths) . In my case the path is /.emacs.d/spacemacs so I have set HOME=~/.emacs.d/spacemacs emacs and have tried the alternative .emacs.d/spacemacs; I have run the env HOME=$HOME/.emacs.d/spacemacs emacs and agin no go, On the command line typeing in emacs does NOT result in spacemacs - any help on this? (I am on Ubuntu 20.04 and using zsh)
BTW I add (setq spacemacs-start-directory "~/.emacs.d/spacemacs/")
(load-file (concat spacemacs-start-directory "init.el")) into the init.el file#2020-05-1111:14practicalli-johnny@dev.4openid sounds messy. Do you really want to implement a significant part of your Emacs configuration outside of Spacemacs? Or do you already have an Emacs configuration that you want to keep? They seems to be the only reasons to take the approach you are discussing. I think you will largely be on your own as this would be a very custom setup.
I would avoid cloning spacemacs into a sub-directory of .emacs.d , that is not what the Spacemacs instructions suggest and seems to be causing problems. Try following the instructions exactly and ensure it is working before changing to different directories. Typing emacs as a command by itself is not part of the instructions you have linked to.
You do not state what file you are putting the spacemacs-start-directory configuration setting in, this should be in your own custom .emacs.d/init.el configuration file, not in any of the spacemacs configuration. You cant tell Emacs where to load Spacemacs from inside Spacemacs if you havent told Emacs where Spacemacs is already :)
If you want to make add custom elisp configuation to Spacemacs, that can be done within the dotspacemacs/user-config section of .spacemacs.
If you just want to version control your .spacemacs configuration, you can simply move the file to .spacemac.d/init.el instead and no specific configuration is required. This is what I did with my configuration - https://github.com/practicalli/spacemacs.d/#2020-05-1117:38Drew VerleeDoes anyone have a good solution for integrating REBL with spacemacs? I understand this is more of a nrepl vs native repl (REBL expects a native repl right?) issue. But given i drive my nrepl often through cider via emacs i feel this is a good place to start.#2020-05-1120:41practicalli-johnny@drewverlee REBL is on my TODO list (its a very long list) but havent even tried it yet. Sean Corfield seems to have used REBL quite a lot, but not with Spacemace or Emacs though.
I found this project on the internet that connects to REBL over nREPL, so wondering if that helps https://cljdoc.org/d/nrepl-rebl/nrepl-rebl/0.1.1/doc/readme#2020-05-1120:56practicalli-johnnyAssuming you are using a deps.edn project, would it be as simple as adding the REBL alias defined in the project or user deps.edn file and then using a dir-locals.el to include the -A:rebl alias in the clojure command line that CIDER uses when running cider-jack-in .#2020-05-1120:58practicalli-johnnyHmm, maybe not. The docs specify running REBL as the main namespace rather than your application code. I guess that makes sense as you dont want to connect the CIDER editor to REPL. Instead CIDER should be connecting to your project code.#2020-05-1121:03practicalli-johnnyOkay, so perhaps starting a Clojure project with cider-jack-in, adding in the deps.edn alias using a dir-local.el to set the :rebl alias as the default (adding it to the cider jack-in command). Then running REBL once the REPL for the Clojure project has started and connected to CIDER. It seems you can run an instance of REBL by evaluating (cognitect.rebl/ui) . Maybe there is a CIDER hook that can be called at the end of the cider-jack-in command that will call the REBL UI code? Something to try when I get a moment.
Edit: this runs REBL but it's not connected to the Cider evaluation actions.
It seems https://github.com/RickMoynihan/nrebl.middleware is the way to go. I'll try that tomorrow#2020-05-1121:17dev.4openID@jr0cket I added the dependencies
[com.cognitect/rebl "0.9.108"] now 0.9.220
into my project.clj Then I ran lein deps and it cannot find at maven or clojars. What do I do now?
It seems that the item has to be manually entered into maven?#2020-05-1122:40practicalli-johnny@dev.4openid
https://github.com/cognitect-labs/REBL-distro seems to be the only source of REBL.
No instructions are available for Leiningen, only deps.edn projects.
For Leiningen you could try lein install with the REBL jar file, but it's been a while since I used Leiningen, so you may need to Google the exact command#2020-05-1204:26lispyclouds@dev.4openid you can use this as a reference from one of my projects:
https://github.com/into-docker/clj-docker-client/blob/master/project.clj
here are the instructions: https://github.com/into-docker/clj-docker-client#developing-with-cognitect-rebl
hope this helps? š#2020-05-1307:22jumarNot long ago I updated my spacemacs develop branch and now I'm getting these errors quite frequently. Is it normal?#2020-05-1307:23jumarIt happens when I'm (mis?) typing something in the helm buffer (after pressing SPC /), for instance and it's really annoying since it breaks my flow a lot#2020-05-1307:24jumarIf often happens when I try to add -t <type> for ex. -t html to restrict the search#2020-05-1307:27jumarHere some more details:#2020-05-1309:34practicalli-johnnySPC / followed by -t displays this message in the mini-buffer "Error running timer: (error "Candidates function 'helml-ag-do-ag-candidate-process' should run a process") on the latest develop & Emacs 26.3.
I am sure I have seen similar messages before, but not very often.#2020-05-1309:36practicalli-johnnyI use the ripgrep binary for search and I use the -g option for narrowing down file types
https://practicalli.github.io/spacemacs/spacemacs-basics/working-with-projects/searching-projects.html#2020-05-1309:37practicalli-johnnyrgrep does not have a -t option, so that may explain the error (an assumption).#2020-05-1309:42practicalli-johnnyDoes your search binary support the -t option an does Emacs pick up that binary in the path?#2020-05-1309:42practicalli-johnnyThe only change I've notices around helm is to provide a fallback to Emacs fuzzy search if other search tools are not found https://github.com/syl20bnr/spacemacs/commit/c7ed2fc597e26de0f61209a4a8d63089fa2c4f3e#2020-05-1311:10jumarripgrep does have -t option: https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#manual-filtering-file-types
But I was using it incorrectly (with space after -t); however, even with proper syntax it fails very early....#2020-05-1311:11jumarI guess my emacs might be using incorrect binary - how do I find that?
(rg does accept the -t in shell)#2020-05-1313:19aisamuUsing rg with develop (behind 71 commits, +- 1 month), no issues here. Just make sure to invoke it without a space between the flag and the type (e.g. -tclojure query, not -t clojure query)#2020-05-1313:20aisamu$> rg --version ripgrep 11.0.2
#2020-05-1403:21jumarMy version of ripgrep in shell works just fine. It's just the spacemacs that's failing. As soon as I start typing -t<any_char> the debugger error is shown.#2020-05-1413:57practicalli-johnnyI can use -tmd followed by a search pattern and it works correctly. Although in the same project -tclj fails. The -t option seems unreliable, so I will stick with -g which has always worked flawlessly.#2020-05-1415:19aisamu@U05254DQM I think it's -tclojure#2020-05-1415:20aisamurg --type-list should give you the full list of types and their associated extensions.#2020-05-1416:20practicalli-johnny@U1UQEM078 Ah, in that case -t works correctly for me with the latest Spacemacs develop branch. I just updated Spacemacs and packages yesterday.#2020-05-1607:06jumarYes, -tclojure is the way to go - you can define your own alias -tclj .
All of this used to work for me but it's suddenly broken š (that error shown above)#2020-05-1612:09aisamuI'd check that your e-macs is getting the correct path from the shell upon initialisation.
What do you get from (helm-ag--construct-do-ag-command "test")#2020-05-1902:53jumar("rg" "--vimgrep" "--no-heading" "--smart-case" "test")#2020-05-1913:00aisamuThe generated parameters here are a bit different (`("rg" "--smart-case" "--no-heading" "--color=never" "--line-number" "--max-columns=512" "test")`) but I can't see how that'd justify your failure. Your parameters work fine on the command line for me as well (but I get one line per match, with column information as well)#2020-05-2103:40jumarFor some reason it now works better - I updated Mac OS X yesterday and also run brew upgrade which could affect the things it works...#2020-05-1509:27kirill.salykingoodday
how one starts both clj and cljs?
when I use cider-jack-in-clj&cljs - i am asked which command should be used?
https://www.dropbox.com/s/k2whs2w7bwsyoq1/Screenshot%202020-05-15%2011.23.45.png?dl=0
(not clear is it for clj or for cljs?)
If I select clojure-cli - failure with piggieback not found
If i select shadow-cljs - i have two cljs buffers (seems like, because in the supposedly clj REPL I see mention of ;; ClojureScript REPL type: shadow)
please advice?
Thanks#2020-05-1513:12aisamuIf this is a shadow-cljs project, you should probably pick shadow-cljs.
Regardless of what the buffers say, are you able to evaluate expressions on .clj files?
As an ugly short term fix: if you really have two separate CLJS REPL connections, you may pick one of those and type/send `:cljs/quit - it'll be "demoted" to a CLJ REPL.#2020-05-1514:42kirill.salykinthanks, i ll give it a shot #2020-05-1517:33dev.4openIDI assume you are running emacs/spacemcs.Ā You can instigate multiple instances of CIDER and each one wil have a separate socket. You will have to be conscientious as to which you are mapped to. It is not obviously easy#2020-05-1806:53kirill.salykin> Regardless of what the buffers say, are you able to evaluate expressions onĀ `.clj`Ā files?
Nope, it is indeed shadow-cljs repl
clj files cannot be valuted because deps are not loaded#2020-05-1814:11aisamuSure, but can you evaluate (+ 1 3) within a clj file? If there's a CLJ available anywhere, it'll be possible. If both are CLJS, it'll complain#2020-05-1814:13kirill.salykineven if i can - the fact that it cant load any clj dependency makes it useless
not a biggie, I still can start two repls separatly :)#2020-05-1814:14kirill.salykinprobably the cider issue⦠will file the ticket#2020-05-1814:14kirill.salykinthanks for your help and advices#2020-05-1814:22aisamuYup, the point is to narrow down what's going on with your setup#2020-05-1709:57murtaza52how do I get my Helm Projectile Grep SPC / to ignore all .js files.
I have included the *.js entry in my gitignore, but the global search above still pulls it up.#2020-05-1712:29practicalli-johnny@murtaza52 I use the globbing option to ignore a file extension in search -g!*.js
https://practicalli.github.io/spacemacs/spacemacs-basics/working-with-projects/searching-projects.html#2020-05-1712:29practicalli-johnnyThis works if you have ripgrep or silver-searcher binaries installed#2020-05-1713:46murtaza52@jr0cket I installed ripgrepnow how do I ensure that it is being used for searching ?#2020-05-1713:48murtaza52also is there no way to specify that these files should alwways be excluded in any searching ?#2020-05-1713:48murtaza52Even when I search for files SPC p fI dont want generated .js files to show up, how do I do that ?#2020-05-1713:52spfeifferDoes this help: https://emacs.stackexchange.com/questions/16497/how-to-exclude-files-from-projectile ?#2020-05-1715:05practicalli-johnny@murtaza52 if ripgrep is found on the executable path, then it is used. There is a setting in .spacemacs to define a custom order, but by default it will look for ripgrep first.#2020-05-1715:08practicalli-johnnyYou can add a .projectile file in the root of a project and add patterns. However, I thought projectile excluded patterns from .gitignore too.#2020-05-1715:56aisamuYup, SPC / takes .gitignore into account#2020-05-2414:06Drew VerleeThats the plan, yet if you recall, i had the same issue. There are cases where it doesn't work, maybe due to what underpins the SPC / command or the project structure.
I guess i should get better about making bug reports, but its hard to switch context off your job to make a good report.#2020-05-2415:28practicalli-johnnyI am aware projectile doesnt load in changed files when you already have a project open, so I assume a change .gitignore may not be used until after a new file is open from that project. This is certainly the case for .dir-locals.el files, so imagine its the same for .gitignore .#2020-05-2415:28practicalli-johnnyOf course there could be a bug in projectile too..#2020-05-1715:17practicalli-johnnyTry reload one of the project files after changing the .gitignore file to get projectile to re-read the .gitignore file#2020-05-1715:56aisamuYup, SPC / takes .gitignore into account#2020-05-1715:56aisamuBut I'm not sure if that's projectile's fault or the underlying tool (`rg` here)#2020-05-1716:07practicalli-johnnyAccording to ripgrep docs it does ignore the patterns in .gitignore along with other things https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#automatic-filtering#2020-05-1806:56kirill.salykingoodmorning
jack-in-clj&cljs with shadow-cljs seems to start two clojurescript repls for me
does anyone has the same issue? is it spacemacs or cider?
thanks#2020-05-1808:52murtaza52@jr0cket @spfeiffer @aisamu thanks for the help. Including the correct globbing patterns in the .gitignore file did the trick.#2020-05-1808:56murtaza52Usually when I want to evaluate a form SPC m e f does the trick. This is very handy because I can eval the form when my cursor is at any point of the form.
However while development I also have a lot of forms in the comment block, and these cant be evaled using the above. To eval these forms I need to navigate to the start of the form and then eval them using SPC m e v This works but is tedious, because I always need to navigate to the start of the form first.
Any tips on how I can reduce the pain ?#2020-05-1809:32kszabo(setq clojure-toplevel-inside-comment-form 't)
#2020-05-1809:33kszabothis will make ,ef work as āexpectedā in comment forms#2020-05-1810:30practicalli-johnnyTo evaluate forms in a (comment ,,, ) block using , e f I add the layer variable clojure-toplevel-inside-comment-form t to the clojure layer definition in .spacemacs. For example, my clojure layer config is as follows
(clojure :variables
clojure-toplevel-inside-comment-form t
cider-overlays-use-font-lock t
clojure-enable-linters 'clj-kondo)
If you are going to use setq instead, then it should really be wrapped in an add-hook form.#2020-05-1810:31practicalli-johnnyFor individual forms I simply use the #_ reader macro to comment that form. If this is placed on the line before, then , e f will evaluate even though the form is commented. For example:
#_
(str "I wont evaluate when you eval the buffer, but will evaluate when using , e f")
#2020-05-1810:34practicalli-johnnyYou can also create a design_journal.clj namespace and add your forms to that, then you do not need to comment them out at all#2020-05-1811:01murtaza52@thenonameguy @jr0cket thanks for the tips#2020-05-1811:03murtaza52I feel lately that my spacemacs is not snappy, it takes time to respond to commands, is there anything I can do to make it more responsive ?#2020-05-1811:16practicalli-johnny@murtaza52 The only time I had Spacemacs become slow to respond was when my Operating System updated the desktop compositor (compton) it used and there was a lag redrawing the cursor, very annoying. Otherwise I have always had Spacemacs be very responsive across multiple laptops.
Is it still slow if you switch the current fundamental mode? Sometimes excessive font locking can slow things down, so fundamental mode will switch that off. Have you checked Emacs its running any processes, SPC a p ?
There are some other troubleshooting ideas here, probably the ones toward the bottom are more relevant https://practicalli.github.io/spacemacs/install-spacemacs/troubleshooting.html#2020-05-1811:17murtaza52I get the following warning when I connect to an external shadow-cljsrepl -
WARNING: CIDER requires cider-nrepl to be fully functional. Some features will not be available without it!
However if I start the shadow-cljs using cider-jack-in I dont get the warning. What could be wrong ?#2020-05-1811:20practicalli-johnny@murtaza52 cider-nrepl library is injected into the command line when using cider-jack-in- commands. You need to add cider-nrepl to your startup or project when using cider-connect and using a version that works with the version of CIDER you are running (one reason I try avoid using cider-connect) . I am sure there are some docs that describe how to do this on the internet, but I have forgotten how to do this now, sorry.#2020-05-1811:25practicalli-johnnyThere is some info in the shadow-cljs docs https://shadow-cljs.github.io/docs/UsersGuide.html#_preparing_the_app#2020-05-1811:26practicalli-johnnyalthough using jack-in approach is going to be less fiddly https://shadow-cljs.github.io/docs/UsersGuide.html#cider#2020-05-1812:23murtaza52thanks created a new alias in the deps.edn and added the cider-nrepl dep there. Then referred that alias in the shadow-cljs.edn file.#2020-05-1820:07Drew VerleeHas anyone had luck with the kuberenetes layer? It just crashed my computer š#2020-05-1822:34practicalli-johnny@drewverlee not tried kubes layer in Spacemacs yet. You could always ask on the Spacemacs Gitter chat https://gitter.im/syl20bnr/spacemacs
Or raise an issue, SPC h I#2020-05-1909:56murtaza52I am using cljs repl, and I find the autocompletion takes a 2-3 seconds before showing up, ex when typing out ns of libs which are included etc. Is there a way to speed it up, it seems jarring when coming from clj repl, where things are much more quicker.#2020-05-1910:00practicalli-johnny@murtaza52 I did some ClojureScript development today, a fairly simple react app and did not experience the same issue. The auto-complete popup appeared straight away for required clojurescript libraries.
It is not something I noticed before, sorry.#2020-05-2105:03murtaza52@jr0cket thanks for trying it out. It seems to be a cache issue, with extended usage it becomes more responsive.#2020-05-2108:12practicalli-johnnyIt maybe something specific to a shadow-cljs project. I tested it out with figwheel-main and a fairly small project.#2020-05-2214:34Drew VerleeIs there a way to create a github repo from emacs? I see forge is included as a layer in spacemacs but i dont see a create repo option. Though that does seem to be listed in magithub.#2020-05-2215:30practicalli-johnny@drewverlee I haven't tried this yet, but I believe you can create a repository on GitHub from within Magit, so , g s then @ for the forge menu, then c f to create a remote repository. You will need to create or select a local Git repository to run magit.
Forge needs to be configured with GitHub first for this to work. There is a wizard for this, although there were quite a few reports of this not working well (especially if you have 2 factor on the GitHub account). It wasnt working when I tried about 5 months ago.
I started documenting the manual Forge config here, although it needs to be tested. This is pulled from a few different pages across a couple of projects.
https://practicalli.github.io/spacemacs/source-control/forge-configuration.html#2020-05-2313:25Drew VerleeThe instructions you have mirror the manual setup + encryption from the official source. Forge still complains that it doesn't have a remote configured. ill search a bit more then given up š#2020-05-2313:33Drew Verleei actually dont see create repo as an option in the layer
https://develop.spacemacs.org/layers/+source-control/github/README.html#git-configuration#2020-05-2314:48practicalli-johnnyThe forge menu has an menu item c f that says create fork or remote, however, the prompts refer more to fork than creating remotes. I am looking into this more#2020-05-2314:55Drew Verleedont sweat it. If i want it bad enough i'll figure it out š.
In the interim i worked out a script to create a github repo based on the repo name.
https://github.com/drewverlee/gr/blob/master/src/gr.clj#L28#2020-05-2316:31practicalli-johnnyIn the tests I've done so far, an existing remote is required before Magit forge works. I forked a repository from the practicalli org to my jr0cket account on GitHub, but Forge seems to fail if there is no remote at all.
It is strange there is no way to create a GitHub repository from scratch.#2020-05-2221:40Drew VerleeI mean, i have two factor on but creating a repo wasn't an issue from curl. It seems oddly lacking from the tools, maybe people haven't revisited this sense github got a more extensive api. idk#2020-05-2321:05Drew Verleehow to rename multiple files recursively:
1. find-named-dir
2. enter dir you want to rename
3. press "t" in this new buffer to mark all files
4. dired-do-rename-regexp (%R)
5. enter new name
6. profit#2020-05-2321:06Drew Verleeso between that and iedit mode you get everything#2020-05-2321:25Drew VerleeI'm stuck between thinking org mode is a good replacement for trello (for me). But also feeling like its a bit too much like... https://www.youtube.com/watch?v=z4FGzE4endQ (satire about VR)#2020-05-2322:19practicalli-johnnyI understand more of Magit forge now, although its not the greatest experience. Its find if you know exactly what everything means.
Repositories need to be added to the forge database (from the forge menu). Then creating and listing issues is obvious enough, although I didnt see a way to label issues.
Creating a fork from an existing repository is fairly straight forward. I also managed to create a pull request using forge. Using a fork I created using forge, I pushed a new branch to the fork and then used forge to create a pull request on the original repository.
I cant say its as nice to use as the rest of Magit, but I'll probably use it to create pull requests to http://spacemacs.org repository.
https://practicalli.github.io/spacemacs/source-control/magit/forge.html#2020-05-2322:32practicalli-johnny@drewverlee I use org mode (org-journal) for my daily todo list and GitHub issues for specific projects. I use TODO states on headings and checkboxes for specific tasks. https://practicalli.github.io/spacemacs/org-mode/org-journal.html#2020-05-2322:35practicalli-johnnyI havent delved into the mysteries of org agenda yet though and I dont use the org-capture feature, although I did used to. I find the org-journal a fairly simple approach and it rolls over tasks I havent marked as done.#2020-05-2409:00murtaza52what is the spacemacs shortcut for showing the buffer list - currently I use Ctrl x b, such that I dont have to use Ctrl#2020-05-2409:16spfeifferSPC b b?#2020-05-2410:08practicalli-johnny@murtaza52 Yes, SPC b b is one of lots of handy commands in the buffer menu https://practicalli.github.io/spacemacs/spacemacs-basics/working-with-projects/managing-buffers.html#2020-05-2412:52murtaza52cool thanks guys#2020-05-2414:33Drew VerleeHow to peak at what the cpu usage of processes spacemacs has started:
1. SPC a p : will show just emacs processes (no mem or cpu usage)
2. SPC a P : will show everything like bash top command.
I'll have to check this when something starts going wrong to be sure it working like i imagine.#2020-05-2415:23practicalli-johnny@drewverlee as SPC a p will show you the PIDs of the processes running, then of course those PIDs can be looked up in top or SPC a P , but not exactly joined up. The list-processes seems to be focused on listing and killing processes, which would benefit of having at least cpu and memory usage. The little I found suggests using the Emacs profiler.#2020-05-2415:25Drew Verleegotcha thanks. I'll look into it more as if it keeps being a pain point š.#2020-05-2415:41practicalli-johnnyThe profiler looks very detailed, SPC SPC profiler-start and choose cpu or memory profiliing (or both). Then SPC SPC profiler-report at any time to see the usage by Emacs commands. It does not seem like its showing external processes though, but will show the commands that call them. Another thing to add to my todo list š#2020-05-2716:13dev.4openIDI am using spacemacs and I have selected Update Packages and have a list of 21 modules to be updated; I receive this:
IT perorms the backup then#2020-05-2716:13dev.4openID--> preparing update of package .......then gets stuck#2020-05-2717:21practicalli-johnny@dev.4openid is should show a message at the bottom saying restart with SPC q r
It sounds like it's not getting that far. Maybe there is a faulty package on Melpa.
I suggest restarting anyway.
You could also check any recent changes made to the .spacemacs file, or SPC f e R to see if any errors are returned.
I have not seen this issue before.#2020-05-2720:15practicalli-johnnyMore updates to the Practicalli Spacemacs book
⢠Staging and unstaging, expanding and navigating sections and fine grain selection of changes https://practicalli.github.io/spacemacs/source-control/magit/stashing.html
⢠Using Magit Forge to pull lists of issues and pull request, fork an existing repo on GitHub and create a pull request from Emacs (no need to visit GitHub and push that green button - https://practicalli.github.io/spacemacs/source-control/magit/forge.html
Magit forge does require a little setup and although there is a wizard it seems a little unreliable, so I documented how to set up Magit forge manually - hopefully a lot clearer than I found the various pages I followed to create this page https://practicalli.github.io/spacemacs/source-control/forge-configuration.html#2020-05-2721:23agilecreativityAny recommendation for binding the sp-copy-sexp in Spacemacs?
I have been using this via SPC SPC sp-copy-sexp for ages.
For some reason I canāt find this default mapping in Spacemacs.#2020-05-2722:55jeff.terrellI havenāt seen that (and Iām on my phone so canāt check it out)āis it different than ya) and y% in evil mode?#2020-05-2823:14agilecreativityWow I really should just use ya). Thanks so much for pointing this out! I came from traditional Emacs and totally forgot about this Vim command.
Thanks @U056QFNM5 #2020-05-2823:32agilecreativityI use % to jump between open and close parentheses all the time and for got that y% is something I need for getting the same effect as the above.#2020-05-2823:42jeff.terrellFantastic! Glad that was helpful. Cheers.#2020-05-2809:50practicalli-johnny@agilecreativity SPC k y is the standard Spacemacs key binding for sp-copy-sexp , well actually evil-lisp-state-sp-copy-sexp that wraps the former in Evil. There are also numerous ways to do the same in Evil normal state too. https://www.spacemacs.org/doc/DOCUMENTATION.html#lisp-key-bindings#2020-05-2810:01practicalli-johnnyIf you are using Holy mode (Emacs keybindings) then Smartparents defines C-M-w , although I didnt get this to work so you may have to add your own keybindings https://github.com/Fuco1/smartparens/blob/555626a43f9bb1985aa9a0eb675f2b88b29702c8/smartparens.el#L307#2020-05-2818:36practicalli-johnnyI've updated the Magit Forge section of Practicalli Spacemacs to include a configuration to control how many open and closed issues and pull requests are displayed. By default it shows a both open and closed items. Specifying 0 for the closed items hides closed issues permanently. Specifying a negative number for closed topics allows toggling the view to include them using SPC SPC forge-toggle-closed-visibility (a PR for a keybinding for this seems to be in my future).
(setq forge-topic-list-limit '(100 . -10))
I also added details on creating and editing issues from Spacemacs, its nice and fast.
I've also updated the practicalli/spacemacs.d repository with the topic list limit configuration - https://github.com/practicalli/spacemacs.d/#2020-05-2902:19Drew VerleeI'll update tomorrow when I'm at the computer but I traced my two factor issues back to ghub and they were saying GitHub was going to shake things up so the authors were kind of stuck in limbo.#2020-05-2902:20Drew VerleeI would just be worried other forge stuff might get effected.#2020-05-2905:22practicalli-johnnyGitHub has changed things quite a few times and there is the graphql api available now. Hopefully GitHub keep the existing api and use a different name for what ever new thing they create, but only time will tell#2020-05-2912:53practicalli-johnnyI am really enjoying using Forge though and finding it more useful than I though, especially once I figured out how to create and update issues#2020-05-2820:37zaneWith SPC f R is there a way to get spacemacs to accept the new filename as written? If the new filename is a subsequence of the original file name RET just confirms the original name.#2020-05-2923:48zaneFor anyone following along, what I wanted here was either C-M-j (for ivy-immediate-done, or to set ivy-use-selectable-prompt to t and then move the selection up to the prompt itself.#2020-05-2820:41aisamuJust press up to highlight the row that starts with a question mark#2020-05-2901:31donyormJust updated to the develop branch of spacemacs. In clojure repls C-j now no longer makes a new line in the repl. How do you make new lines in a repl buffer now?#2020-05-2902:07aisamuI'm not sure what you're referring to, but
SPC j n and pressing enter while on input mode add newlines on the repl buffer#2020-05-2912:29practicalli-johnnyC-RET in Evil insert state or Emacs to span your code over multiple lines in the Clojure REPL buffer.
C-j and C-k cycle through the REPL history
https://practicalli.github.io/spacemacs/evaluating-clojure/evaluate-in-repl-buffer.html#2020-05-2912:30practicalli-johnnyIts more common to write code in source code files and evaluate specific expressions as you write or change them.
https://practicalli.github.io/spacemacs/evaluating-clojure/#2020-05-2915:10telekidalso see the useful cider-scratch-buffer, if you want a place to evaluate forms without throwing them into tracked files#2020-05-2915:16donyormThanks thatās helpful!#2020-05-3020:38Drew VerleeIs there a way in lisp state to move by clojure map keys?#2020-05-3021:58aisamuI'm not sure what you mean by this, do you mind rephrasing?#2020-05-3023:02Drew VerleeMy cursior is the *
{:A* :b :c :d} I want to jump to the next key (:c).
Does anything do this?#2020-05-3113:06aisamuI see! I don't believe there's a shortcut for that other than 'move 2 symbols forward' SPC K 2 l#2020-05-3119:55Drew VerleeThanks. In this case the map value is just one symbol, in a lot of others it's many more. I think the solution is that I'll read the map/edn into memory and just add keys that way then write it back out. Similar to how I work with a database.#2020-05-3020:38Drew Verleemove by symbol isn't right nor is by parns#2020-05-3020:39Drew VerleeI think in the use case i'm in i should just read the map (which is really large) into memory and alter it there then just write it back out.#2020-05-3020:39Drew Verleebut it would be nice to know if there is a way to do this.#2020-06-0208:26Yehonathan SharvitIs there a way to display the current namespace instead of the filename in the bottom of a Clojure buffer?#2020-06-0208:44practicalli-johnnyThe Spacemacs Madeline is very customisable and there are several themes and you can also create your own custom mode line https://github.com/syl20bnr/spacemacs/blob/develop/doc/DOCUMENTATION.org#mode-line
I assume you would need to write a function to get the current namespace and add a hook to call it when ever you open or switch to a buffer, then update the mode line.
There are scripts like the battery indicator that might give you clues.
Not something I would personally invest the time in as the namespace partly made from the file name anyway.#2020-06-0208:48Yehonathan SharvitI am wondering why the clojure mode doesnāt dispayl the current namespace in modeline. It seems to me like a basic need.#2020-06-0209:24practicalli-johnnyI don't understand why it would be considered a basic need, can you elaborate?#2020-06-0210:02Yehonathan SharvitWhen I switch to a buffer, Iād like to know what buffer I am in.
Currently only the short buffer name is displayed (e.g. core.clj) which is sometimes not enough to get the context#2020-06-0211:23practicalli-johnnyEdit: short answer: try the doom modeline theme, update .spacemacs with:
dotspacemacs-mode-line-theme '(doom)
Original long answer...
I believe there are options to configure how much of the path is shown and different mode-line themes have different defaults. I assume showing more of the path would be less work for you to configure than writing a function that extracts the Clojure namespace of a file open in a buffer.
If its a nested namespace then yes more context could be useful, although I am wondering how much of the namespace would need to be shown in order to be useful. There is only a limited amount of space on the mode line and it would not be as useful as simply jumping to the top of the buffer and back again. Having the full project path should give you as much context as the actual namespace (as they should be the same, baring a - and _ difference.
I guess I don't rely on the mode line in Emacs that much, the file name is more than sufficient for me or using g g to jump to the top of the buffer and look at the ns declaration, which would provide much greater context as it shows the interned namespaces and functions, so far more than could be shown in the mode-line.
I avoid core as a namespace, although that does give sufficient meaning to me as it should be the main entry into the project. The file name is next to the project name, as I use a workspace for each project. The REPL connection also has the project name too, so I wouldnt need any other information if I had core.clj name in the prompt.
I have been using more meaningful namespace names especially now I use deps.edn and clj-new, rather than use Leiningnen to generate projects.#2020-06-0219:01Yehonathan SharvitThanks for the info about doom-modeline
Iāll give it a try#2020-06-0306:14plexus@viebel I have a package that does exactly that. https://github.com/plexus/plexmacs/blob/master/clj-ns-name/clj-ns-name.el could stand to be improved and it's sorely missing error handling, which means that I sometimes need to disable it to be able to open a file (e.g. babashka scripts where the parser trips over the shebang), but works 99% of the time, been using this for a few years already#2020-06-0306:15Yehonathan SharvitAwesome!
How do I use this package in spacemacs?#2020-06-0306:17plexussee the comments, you just call (clj-ns-name-install) in your config. You'll need to install walkclj as well. That one is on melpa, this package isn't#2020-06-0306:18plexusI load this as part of a custom layer but probably easier to just drop it in your config and require it like any other elisp file https://github.com/plexus/plexmacs/blob/master/layers/plexus-clojure-extras/packages.el#L14#2020-06-0318:51Yehonathan SharvitThanks a lot. Will try it!#2020-06-0306:14plexus@viebel I have a package that does exactly that. https://github.com/plexus/plexmacs/blob/master/clj-ns-name/clj-ns-name.el could stand to be improved and it's sorely missing error handling, which means that I sometimes need to disable it to be able to open a file (e.g. babashka scripts where the parser trips over the shebang), but works 99% of the time, been using this for a few years already#2020-06-0310:10dev.4openIDon ubuntu using spacemacs - how do I copy from/to spacemacs from another editor (usually C-c C-v) and vica versa?#2020-06-0310:27practicalli-johnny@dev.4openid in Spacemacs you yank or kill some text and it should go into the Ubuntu clipboard and be available from C-v in other editors and applications. To paste into a terminal shell, use the shift key, eg C-S-v. Anything you copy with C-c in Ubuntu can be pasted with p (Evil normal state). I have forgotten all the Emacs keybindings...
To yank something using Evil normal state, y y for the current line, v to select a region and y to yank the highlighted region, SPC v to select a symbol (`v` to grow the scope, S-v to shrink the scope of selection) and y to yank. There are other approaches too...#2020-06-0312:15craftybonesAh here!#2020-06-0312:15craftybonesIāve hit a major roadblock with Calva and while I love Calva, I am forced to move to Spacemacs. I am just beginning, and it might be weird to ask, but I am guessing most people here are sufficiently happy with spacemacs#2020-06-0312:24spfeifferāforced to moveā? I do not hear that very oftenā¦#2020-06-0312:26craftybones@U067P1FT2 - a flair for the dramatic#2020-06-0312:27spfeifferAs you might guess, the ones who hang out in this channel are satisfied with Spacemacsā¦#2020-06-0312:29craftybones@U067P1FT2 - Indeed. I am unsure where to start though. It seems like the defaults of evil mode should be the right way to go#2020-06-0312:29craftybonesdocumentation time#2020-06-0312:34spfeifferThe @jr0cket Website is an excellent resource#2020-06-0312:36craftybonesThanks @U067P1FT2#2020-06-0312:38spfeifferhttps://practicalli.github.io/#2020-06-0313:08practicalli-johnny@srijayanth as you come from Vim, also read https://develop.spacemacs.org/doc/VIMUSERS.html#2020-06-0313:09practicalli-johnnyand use the Spacemacs develop branch rather than the default master branch#2020-06-0417:48Drew Verlee^^^ @srijayanth read all of https://practicalli.github.io/ then get started, imo.#2020-06-0417:48Drew Verleei made it hard on myself for not doing that.#2020-06-0417:49Drew Verleespacemacs comes with more options then you need in some areas and it can be painful if you don't follow the advice there.#2020-06-0417:50Drew VerleeNo need to master every section but have it as your go to reference for how to do something. Its likely mentioned in there.#2020-06-0417:50craftybones@U0DJ4T5U1 - thanks, I am well on my way. My familiarity with both vim and emacs helped me immensely#2020-06-0312:16craftybonesIāve used vim almost all my adult life and emacs doesnāt bother me very much#2020-06-0312:17craftybonesAs long as I have decent nrepl integration with formatting, I am happy#2020-06-0312:54dev.4openID@jr0cket you are right with what you stated. However, I was asking to copy text between spacemacs and a text app - both ways:grin:#2020-06-0313:00practicalli-johnnyI already answered that part too...#2020-06-0313:09dev.4openIDDarndest thing, I had tried that and did it again. Did not work.
Upgraded packages and rebooted spacemacs and now works?!!!!??? Grrrrr"#2020-06-0312:58spfeifferI think emacs will just share the system clipboard, like a good OS citizen.#2020-06-0315:07Ho0manSorry to ask here as well#2020-06-0315:32practicalli-johnnyHope the answer in #clj-kondo works for you. If you get stuck let us know. Thanks.#2020-06-0316:44craftybonesIs there a way to eval a form in a scratch buffer?#2020-06-0316:58craftybonesIs there a function to surround expression with () ?#2020-06-0317:01craftybonesIām using viw to select inner word and then an M-(#2020-06-0317:09practicalli-johnny@srijayanth SPC k w is the smartparens command to wrap an expression, or in Evil I would use SPC v to highlight the expression, or * if its a symbol, and then s ) to surround with () without spaces. There are lots of ways though š#2020-06-0317:10practicalli-johnny, e f is the usual command to evaluate the current form (from the top level). Havent tried the scratch buffer though#2020-06-0317:12craftybonesspc k w is cool. Spc v wonāt work on hyphenated expressions#2020-06-0409:51flefikyou can extend what spacemacs considers a word to include - in clojure-mode and then it works#2020-06-0507:47craftybonesThanks @UAEFFG05B#2020-06-0317:12craftybonestwo vs#2020-06-0317:12craftybonesbut yeah#2020-06-0317:12practicalli-johnnyv will expand the SPC v selection and shift v contracts the selection#2020-06-0317:16practicalli-johnnyI added a bunch of Evil key combinations on this page as I was learning Vim style editing https://practicalli.github.io/spacemacs/spacemacs-basics/vim-style/speaking-evil.html
There are more examples on the following page and a lot more I havent thought of...#2020-06-0317:19craftybonesCool, thanks#2020-06-0317:25craftybonescider-doc requires fully qualified namespace?#2020-06-0317:34craftybonesso how would I get the doc of say something under my cursor?#2020-06-0317:38practicalli-johnny@srijayanth with the cursor over the name of a function, , h h or SPC SPC cider-doc will popup a buffer with the clojure docstring for that function. This only works if a Clojure REPL is running for the project. To start a REPL use , ' or SPC SPC cider-jack-in-clj . This works the same for a project or the clojure-scratch buffer, either way you require a running REPL. You will need Clojure CLI or Leinignen installed, eg. https://practicalli.github.io/clojure/getting-started/install-clojure.html#2020-06-0317:44craftybonesThanks @jr0cket#2020-06-0317:44craftybonesmy clj kondo isnāt working. Not sure why. Master branch#2020-06-0317:46craftybonesit is on path, Iāve added flycheck-clj-kondo to dotspacemacs-additional-packages#2020-06-0317:48practicalli-johnnyIf you havent restarted Emacs since adding that config, that would be the first thing I would do. Just doing SPC f e R does not always resolve the loading order of Emacs packages when they are already running.#2020-06-0317:48craftybonesno, restarted it#2020-06-0317:48craftybonesI Spc-q-r#2020-06-0317:53craftybonesdotspacemacs-additional-packages '(flycheck-clj-kondo)
#2020-06-0318:01practicalli-johnnyDo you also have this in the dotspacemacs/user-config
in the .spacemacs file?
(use-package clojure-mode
:ensure t
:config
(require 'flycheck-clj-kondo))
#2020-06-0317:53craftybonesThat line seem alright?#2020-06-0317:53practicalli-johnnySPC e v will run flycheck-verify setup in a Clojure buffer, that may show if there is an error with any particular back end.
Confirm you have the syntax-checking layer added to the .spacemacs file.
Check the message buffer for errors, SPC b m
In general, I do recommend switching Spacemacs develop branch as it has about 2 years worth of fixes and features over Spacemacs master. Here is a guide to switching if you decide you want to https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html
clj-kondo is also easier to install :)#2020-06-0317:54craftybonesAh cool. clj-kondo is installed#2020-06-0317:54craftybonesand working#2020-06-0317:55craftybonesbut flycheck mode is disabled#2020-06-0317:58practicalli-johnnyWhen I run SPC e v with the current buffer being in Clojure mode, I get the following output
Syntax checkers for buffer 034_implement_range.clj in clojure-mode:
First checker to run:
clj-kondo-clj
- may enable: yes
- may run: t
- executable: Found at /home/practicalli/bin/clj-kondo
Checkers that are compatible with this mode, but will not run until properly configured:
clj-kondo-edn
- may enable: yes
- may run: nil
- executable: Found at /home/practicalli/bin/clj-kondo
Flycheck Mode is enabled. Use SPC u C-c ! x to enable disabled checkers.
--------------------
Flycheck version: 32snapshot (package: 20200513.444)
Emacs version: 26.3
System: x86_64-pc-linux-gnu
Window system: x
#2020-06-0318:04practicalli-johnnyThe first checker shows that it found clj-kondo-clj has been found, shows it runs and shows which binary its using#2020-06-0318:11craftybonesThanks. Its working well now#2020-06-0318:11craftybones@jr0cket - on your site where you say
SPU u before cider-jack-in displays the command line to be run, ...
#2020-06-0318:12craftybonesis that SPC u? If so, I am not sure how that works#2020-06-0318:18craftybonesSpc u , '#2020-06-0318:18craftybonesI got what you were saying. Prefixing a command with an argument can be done by spc u#2020-06-0318:22craftybonesPretty much got most things I want working, the only thing really missing is that I canāt get help to work for the word under cursor#2020-06-0318:33practicalli-johnnyDo you have a repl running?
Can you evaluate code, e.g using , e f when the cursor is on an expression?
Do you get an error when using , h h ? Or a prompt in the mini buffer saying Doc: ?#2020-06-0318:45craftybonesI have a repl running, my , e f works#2020-06-0318:45craftybonesI am upgrading to development branch, let us see#2020-06-0318:50craftybonesUpgraded, but now, I canāt seem to get my autocomplete to work#2020-06-0318:53craftybonesInteresting. Autocomplete works but not at a require level#2020-06-0319:37practicalli-johnnyauto-complete doesn't complete external libraries in require, but think it does ones for the project.
For external libraries you can try enabling clojure-enable-clj-refactor variable on the Clojure layer
https://practicalli.github.io/spacemacs/install-spacemacs/enhance-clojure-experience.html#2020-06-0408:24craftybonesI am unable to run tests. It complains on missing ringās mock request. I initially thought that the REPL might not have been launched with the right alias, so I launched it with the right alias, but it is still bombing for that reason#2020-06-0408:32craftybonesHow do I get nrepl to pick up deps.ednās src/test etc?#2020-06-0408:32craftybonesI mean the aliases in deps.edn#2020-06-0408:33craftybonesIām doing Spc U followed by , ' and then typing in the alias I awnt#2020-06-0408:33craftybones*want#2020-06-0408:33craftybonesHowever, it doesnāt seem to be picking the dependency#2020-06-0408:40craftybonesmy deps.edn has a test alias that contains the mock lib I am using#2020-06-0408:42practicalli-johnnyThe alias used with Cider should include the test path, or as a hack you can add test to the main path definition in deps.edn#2020-06-0408:44practicalli-johnnyCreate a dir-locals.el file to set the default aliases for a project and starting Cider will then use them. Here is how to create a dir locals (although you need a different variable) https://practicalli.github.io/spacemacs/clojure-projects/monorepo-nested-projects.html#2020-06-0408:45practicalli-johnnyHere is a post that explains all the options, towards the end is the dir-locals example https://practicalli.github.io/blog/posts/cider-jack-in-to-clojure-cli-projects-from-spacemacs/#2020-06-0408:46practicalli-johnny((clojure-mode . ((cider-clojure-cli-global-options . "-A:alias-names"))))#2020-06-0408:49practicalli-johnnyYou will need to reopen the Clojure file (or revert buffer) to force the dir-locals.el file to be read by Emacs#2020-06-0408:51practicalli-johnnyIf that doesnāt fix it, I can take a look at the code (if you are able to share it)#2020-06-0408:53practicalli-johnnyAlso ensure that the deftest functions have been evaluated and you have included the relevant requires and dependencies.#2020-06-0409:04craftybonesI got the tesst working. Thanks. I was putting the -A after the -S so the deps werenāt taking. My fault#2020-06-0409:04craftybonesHowever, upon rerunning tests, I am not sure where the reports are. The cider-test-report buffer shows an older result#2020-06-0409:07practicalli-johnnyIf tests are changed without re-evaluating those tests, the results of the previous version will be shown. Is that what is happening? Same if you change the name of a deftest function, the old one will run as its still in the memory of the REPL.#2020-06-0409:09craftybonesI am changing a test, saving it and typing in , t a#2020-06-0409:13practicalli-johnny, t a in the test code buffer will evaluate all the functions in that namespace, so any changes should get picked up. Running the tests from a source code buffer does not evaluate the test code and therefore any changes in test code is not picked up, unless you go and evaluate them, eg, , e f on the deftest code.#2020-06-0512:10jumarisn't , t a for running all the tests?
It was changed some time ago I think; it's now , t n to run ns tests.#2020-06-0512:11practicalli-johnnyI've not used ns tests, whats that? Is it just for the specific namespace you are in and does it evaluate the current test code in the buffer?#2020-06-0512:14jumarYou said
> , t aĀ in the test code buffer will evaluate all the functions in that namespace
I thought you meant this to run all the tests in a particular namespace (buffer).
, t a used to work like that but now it's , t n#2020-06-0512:41practicalli-johnnyAh yes, I was really talking about picking up code changes rather than the scope of tests that are run. Sorry for the confusion.#2020-06-0409:16practicalli-johnnyThe test report only shows if you have failed tests by default. If all tests pass, a message is shown in the mini-buffer and a test report is not generated, so , t b does not find a report.
Once a test report is generated, it should be updated each time , t a is run.
To have the test report generated on success, set the custom variable cider-test-show-report-on-success to true in the Clojure layer configuration. For example:
(clojure :variables
clojure-toplevel-inside-comment-form t
cider-overlays-use-font-lock t
clojure-enable-linters 'clj-kondo
cider-test-show-report-on-success t)
#2020-06-0512:00practicalli-johnnyI successfully did a pull request to the Spacemacs repository completely from within Spacemacs itself, no need to visit GitHub in the web browser, just using Magit and Forge and it worked really well. https://practicalli.github.io/spacemacs/source-control/magit/forge.html#2020-06-0512:02practicalli-johnnyThe pull request was to fix the use of doom-gruvbox-light which I am now using as my broadcast theme, it has nice icons and is very clean and uncluttered. The PR has already been merged into Spacemacs develop#2020-06-0512:06nmkipgreat !#2020-06-0512:13nmkipIf I have someething like...
1 (ns foo.bar
2 (:gen-class)
3 (:require [clojure.data.json :as json]
4 [clojure.spec.alpha :as s]))
and I am in normal state somewhere in line 4, is there a key similar to o that does this? :
1 (ns foo.bar
2 (:gen-class)
3 (:require [clojure.data.json :as json]
4 [clojure.spec.alpha :as s]
5 |)) <--- insert mode here and move parens one line down?
#2020-06-0512:44practicalli-johnnyC-j comes close and if you have align-forms-automatically then it kicks the text to the right location.
There may be something better than this. I just use Evil insert mode and RET.#2020-06-0521:36nmkipI also do Evil insert mode and RET , but that doesn't work if I am in the middle of line 4#2020-06-0512:15nmkipAnother one:
1 (ns foo.bar
2 (:gen-class)
3 (:require [clojure.data.json :as json]
4 | [clojure.spec.alpha :as s]))
If my cursor is in line 4 (normal state) and I press D I get:
1 (ns foo.bar
2 (:gen-class)
3 (:require [clojure.data.json :as json]
4 ))
Is there a way to get:
1 (ns foo.bar
2 (:gen-class)
3 (:require [clojure.data.json :as json]))
or at least not force me to press backspace and delete a lot of times?#2020-06-0512:45practicalli-johnnydd will do what you seek. It will delete the line and any parens it should keep get pushed to the previous line.#2020-06-0512:46practicalli-johnnyI believe this needs evil-cleverparens to work correctly.#2020-06-0514:32Drew Verleeand strict mode to be on. But yes that's how it works for me.
There is also probably a way to set clj-format to run frequently which might fix this to. But that solution isn't very useful on anything other then your own proejcts where you control the formatting.#2020-06-0517:18flefikwithout any plugins DJ would work.#2020-06-0521:35nmkipdd works#2020-06-0621:45ro6Is CIDER 0.19.0snapshot (package: 20181021.830), nREPL 0.7.0
Supposed to be the version of Cider that ships with Spacemacs?#2020-06-0621:48ro6I'm running into an issue using Spacemacs with Shadow-CLJS (see convo over in #cider), and hoping I can update to a more recent Cider version so we aren't chasing ghosts š#2020-06-0709:45practicalli-johnnyCider 25 is the latest version on Spacemacs develop branch. Here is a guide to switching https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html#2020-06-0621:48ro6Can that be done independently of upstream Spacemacs? I'm new to Emacs so don't have intuition for where this is controlled.#2020-06-0623:16Chris OāDonnell@robert.mather.rmm I'd recommend using the develop branch of spacemacs, which will give you an updated cider package.#2020-06-0703:48ro6@codonnell Thanks, I'll try that. Can anyone give me the elevator pitch on using Spacemacs vs setting up Emacs+Evil on your own? What justifies buying in to Spacemacs?#2020-06-0706:02craftybonesMy org-mode-ctrl-c-ctrl-c causes a
Symbol's function definition is void: org-outline-overlay-data
#2020-06-0706:03craftybonesSo, my org mode doesnāt really reload. If I kill the buffer and restart, it does work though#2020-06-0706:04craftybonesSo, seems to be specific to the function invoked on org-ctrl-c-ctrl-c#2020-06-0706:15craftybonesHas anyone faced this before?#2020-06-0706:15craftybonesMost of the solutions center around ādelete org and reinstallā#2020-06-0706:19craftybonesor ādelete compiled files and restart emacsā#2020-06-0706:19craftybonesI canāt find a .elc with org-outline-overlay-data in it#2020-06-0706:24craftybonesFound! Ok, this worked#2020-06-0709:40practicalli-johnny@robert.mather.rmm Emacs is arguably the most customisable Editor and allows you to create whatever you want, exactly how you want it. Your customisations are of course your responsibility.
Spacemacs takes hundreds of years of collective experience in using Emacs and Evil and packages that up so it works with hundreds of Emacs packages. The community has a shared code base to help each other solve issues and adopt new features.
Spacemacs is still as customisable as vanilla Emacs and many of those customisations are shared back to the project helping it grow with over 10,000 commits to the project.
Oh, there are 20,000 stars on the GitHub repository if that is something relevant to you.#2020-06-0709:42practicalli-johnnyI like Spacemacs so much I wrote about on how I use it https://practicalli.github.io/spacemacs/#2020-06-0800:04Drew VerleeThe instructions here says i should be able to press g r and get the multiple cursors menu. But that seems undefined. https://practicalli.github.io/spacemacs/spacemacs-basics/evil-tools/multiple-cursors.html. I'm looking around for a decent intro to this topic. I feel like i something simliar by going into visual mode and just selecting multiple lines. Is that different then multiple cursors?#2020-06-0800:22Drew VerleeIm tired, the above sounds insulting. I mean to say, I can't seem to activate the commands#2020-06-0801:39practicalli-johnny@drewverlee first though is that multiple-cursors is not in the layer list in .spacemacs#2020-06-0801:40Drew VerleeProbably something silly like that, I'll check in the morning. Thanks#2020-06-0801:43practicalli-johnnyIts way past my bed time, but wanted to fix my spec code while I was on a roll...#2020-06-0801:42practicalli-johnnyI think a video is far easier to convey how to use multiple cursors, I will try record a few examples during the week and stitch them together into a video. Myself I only really use g r j with a number in front to define how many cursors I want (where relative line numbers comes in handy as it tells me how many lines I need.#2020-06-0810:57jumarI'd like to automatically call (clojure.spec.test.alpha/instrument) (or really my own spec-instrument function defined in the .spacemacs file) every time I do cider-eval-buffer. What's the easiest way to do it?#2020-06-0811:00practicalli-johnnyAsk in the #cider channel is probably the easiest way š#2020-06-0811:02jumarhttps://clojurians.slack.com/archives/C0617A8PQ/p1591614123396200#2020-06-0811:05practicalli-johnnyI think I might have something not too dissimilar that could be converted and might work, somewhere in my GitHub Todo list, but could take a while to get working#2020-06-0922:19nmkipI need some help with in indentation configuration.
Current:
(defexpect date-time-tests
(expecting "String conversions"
(expect #inst "2020-04-05T22:28:12.000" (->date-time "2020-04-05T22:28:12.000Z"))
(expect #inst "2020-12-31T23:59:59.999" (->date-time "2020-12-31T23:59:59.999Z"))))
Wanted:
(defexpect date-time-tests
(expecting "String conversions"
(expect #inst "2020-04-05T22:28:12.000" (->date-time "2020-04-05T22:28:12.000Z"))
(expect #inst "2020-12-31T23:59:59.999" (->date-time "2020-12-31T23:59:59.999Z"))))
Any ideas on how to config spacemacs for my needs?#2020-06-0922:20nmkip;; Auto-indent code automatically
;;
(add-hook 'clojure-mode-hook #'aggressive-indent-mode)
;; Indentation of function forms
;;
(setq clojure-indent-style 'align-arguments)
;; Vertically align s-expressions
;;
(setq clojure-align-forms-automatically t)
#2020-06-0922:21nmkipI commented those 3, but default indentation is still the one I passed as current . Maybe it's some clojure layer variable?#2020-06-0922:36nmkip(setq clojure-indent-style 'always-indent) this worked#2020-06-1002:04zaneNote that thatāll indent other forms like -> in ways that violate the community style guide (which may or may not be a problem for you š).#2020-06-1002:11zaneIf you want to avoid that you can use https://docs.cider.mx/cider/config/indentation.html#macro-indentation to tell CIDER what to do with expecting in particular.#2020-06-1013:52nmkipI tried that! But it didn't work š probably I was doing something wrong#2020-06-1013:53nmkip(define-clojure-indent
(-> 1)
(->> 1))
tried using that#2020-06-1117:15zaneOh, what I meant was that you should use define-clojure-indent instead of clojure-indent-style.#2020-06-1117:18zaneSo youād leave clojure-indent-style set to always-align, and then (put-clojure-indent 'expecting 2).#2020-06-1013:05Drew VerleeI suspect vim's "insert" is given higher priority then cider's "in" (as in "step in", with the debugger context). How do i verify that and whats the best way to change it?#2020-06-1013:20practicalli-johnnyIt seems many of us just work around the issue using C-z to switch to Emacs editing mode, then the same to switch back to evil when finished with the cider debugger. Would be good to get this fixed for evil though.#2020-06-1100:45Drew VerleeThanks for the info.#2020-06-1412:30Drew Verleei get the same behavior you got. cool cool#2020-06-1017:14mathpunkFirst time developing Clojure in a while so my tools may be out of date. I'm going by the Practicalli guide, and I started the project with Sean Corfield's clj-new. If I use , t a I get a message, "No assertions (or no tests were run). Did you forget to use 'is' in your tests?" But if I view the boilerplate test and run , t t I get a nice pretty output window. :thinking_face:#2020-06-1017:43practicalli-johnny@mathpunk Also try , t n to run all the tests in the current namespace, it should load the tests into the REPL too, so you dont always have to evaluate them. (adding this to the book quickly)
To make certain the tests run, they should be evaluated (just like functions in the src code), so , e f for individual fuctions or , e b for the whole namespace (buffer).
If you change the name of a deftest, use , e u to unevaluate that test first or it will keep running until you restart the repl.#2020-06-1018:53nmkipAlso if you have test dependencies under an alias, create the M-x add-dir-local-variable and add cider-clojure-clj-global-options with your alias, for example:`"-A:test"`#2020-06-1018:54nmkipIf it doesn't work, restart spacemacs after creating that file.#2020-06-1017:45practicalli-johnnyWhen using the CIDER test runner, you will need to add the test path somewhere in the deps.edn of the project too https://practicalli.github.io/spacemacs/testing/unit-testing/cider-test-deps-edn-projects.html#2020-06-1102:18Gleb PosobinWhat's the proper way to exit spacemacs so that all the persepctives are saved? I have done SPC q s, but it only restored the buffers, I have to reopen the layouts myself.#2020-06-1110:00practicalli-johnnySPC q r
There is also an explicit option in .spacemacs to save layouts.
SPC l s to explicitly save the layers. I also save to a backup file occasionally#2020-06-1113:22Gleb PosobinBut SPC q r restarts, I just want to quit (when rebooting my laptop).#2020-06-1114:04practicalli-johnnyset the option to remember layouts in the .spacemacs file. the configuration is already there, just need to change it from nil to t#2020-06-1102:18Gleb PosobinBonus question: is it possible to make spacemacs restart the repls that were open? Or just make them start on spacemacs start.#2020-06-1110:01practicalli-johnnyNo. External processes won't be restarted.#2020-06-1102:28Gleb PosobinAlso, is it possible to show treemacs trees for different projects when in different perspectives?#2020-06-1110:04practicalli-johnnyI don't really use Treemacs but it seems to show any project tree for any project where Treemacs has been opened. See SPC h l treemacs to see the layer documentation which lists the key bindings and commands available.#2020-06-1104:03Gleb PosobinOne more question: when I do yy on a line (if (nil? target) nothing gets copied, I think because of parenthesis that are not matched. How do I make this work so it copies something like (if (nil? target)) or without the enclosing parenthesis.#2020-06-1110:07practicalli-johnnyIf you are using smartparens global strict mode then this helps avoid unbalanced parens. Add evil-clever-parens for structured editing support in Evil normal.
I haven't tried to copy an unbalanced expression (as I don't have them). Try V y#2020-06-1113:23Gleb PosobinNo, the expression is balanced, but the closing paren is on another line.#2020-06-1113:24Gleb PosobinI understand that this helps, but it could just copy it without the opening parenthesis, just like dd would delete everything except the opening parenthesis. I am looking for this behaviour. Otherwise it is very annoying since I have to do yy - go to where I want to paste - see it didn't copy - go back - go to the point after the opening paren - press Y - go to the place I wanted to paste in - paste.#2020-06-1114:08practicalli-johnnySorry, I dont understand#2020-06-1114:13Gleb PosobinIf I have two lines
(when x
y)
And do yy on the first line nothing gets yanked, I want either when x or (when x) to be yanked#2020-06-1114:23practicalli-johnnySeems a very strange situation, so probably can't suggest anything useful, sorry.
I assume you would need to write your own function for that, especially to get (when x) from the first line without the y
Much easier to grab the whole expression and delete y after.
Pasting unbalanced or unwrapped code is a very effective way to break code.
Have you looked at the SPC k` menu for structural editing, maybe there is something similar...#2020-06-1115:12Gleb PosobinBut dd does exactly what I want except it also deletes the code in the line!#2020-06-1115:12Gleb Posobindd would remove the when x and leave (y).#2020-06-1415:31Drew Verleewith cider and cljr enabled, assuming you have evaled a namespace, isn't their functionality to auto recongnize the namespace by the filename and auto insert the require.
E.g if i'm in drewverlee.core and drewverlee.helper contains a fn bar wont typing helper/ in core insert the require statment? i feel like this was happening for me and now its not. but maybe thats wishful thinking.#2020-06-1415:56practicalli-johnnyhttps://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-missing-libspec#2020-06-1415:56practicalli-johnnyPut the cursor on the name of a function from a different namespace and , r a m in clojure-mode with the REPL running.
If you put the alias you want to use before the function name, , r a m will also add the alias to the require.#2020-06-1416:26Drew Verleei must have had to much to drink last night, i could have sworn it was magically adding the requires to my namespace. š#2020-06-1416:27Drew Verleebut yes that works#2020-06-1416:33Drew Verleethere. it just did it. i didnt run ,ram and it aut filled it. maybe its when there arent clashes.#2020-06-1416:38practicalli-johnnyPerhaps its one of the magic requires you are using...
https://github.com/clojure-emacs/clj-refactor.el/wiki#magic-requires#2020-06-1416:40Drew Verleenope. its just a ns i created. ill give this another round then give up. its a bit weird.#2020-06-1416:53Drew Verleeok once you use refactor to include a lib once it will include it automaically past that. it must add it to the magic requires list or something.#2020-06-1417:00Drew Verleescratch that, like the docs say it adds them if you define the alias somewhere else that you have evaled.#2020-06-1415:45Yehonathan SharvitWhen cider fails to launch the REPL, an error is displayed in the bottom of the screen. (See screenshot below) but the error is cut.
How can I see the full error?#2020-06-1516:33practicalli-johnnyIn the *cider-error* buffer there are buttons that show and hide information. These buttons are under the top next to the Show: / Hide: labels#2020-06-1415:46Yehonathan Sharvit#2020-06-1415:51Drew Verleei believe the menu in that window has an "all" option.
These are the docs: https://docs.cider.mx/cider/usage/navigating_stacktraces.html#2020-06-1416:39cjsauer@viebel for that I usually navigate to the messages buffer by doing SPC b b and searching *Messages*. The error can be read more easily from there. #2020-06-1506:28jumarYou can just SPC b m#2020-06-1417:56Yehonathan SharvitIndeed the error is fully logged in the *Messages* buffer#2020-06-1417:57Yehonathan SharvitNot sure how to read the error as a stack trace as @drewverlee suggested#2020-06-1418:13Drew Verleeas i understand it, cider classifies the ST by a couple categories (clojure, java, repl) and it lets you filter them out:
Show: Project-Only All
Hide: Clojure Java REPL Tooling Duplicates (39 frames hidden)
it seems to just hide them in the buffer. I assume "more..." indicated some where hidde, but that doesn't seem to be the case.#2020-06-1418:13Drew Verleeyou can't just scroll down in the buffer?#2020-06-1418:28Yehonathan SharvitI can scroll the buffer and read the whole error. Is there a way to navigate errors in *Message* buffer as a stacktrace?#2020-06-1421:58cjsauerNot that Iām aware of. Iāve always assumed that stacktrace navigation required a running cider REPL, which is why exceptions on start appear in this raw form. No clue if thatās true tho. #2020-06-1516:33practicalli-johnnyIn the *cider-error* buffer there are buttons that show and hide information. These buttons are under the top next to the Show: / Hide: labels#2020-06-1507:02Yehonathan SharvitCurrently, in order to eval an expression in my Cider REPL buffer I have to be in insert mode. Is there a way to eval an expression in normal mode?#2020-06-1507:27jumarIt works for me just fine.
How do you eval expressions?#2020-06-1507:30Yehonathan SharvitI have to go into insert mode and press Ctrl-Enter#2020-06-1507:30Yehonathan Sharvitwhen I am in normal mode, pressing Ctrl-Enter has no effect#2020-06-1507:31Yehonathan SharvitIn insert mode, Enter works also#2020-06-1507:32jumarAh, I thought you're talking about clojure buffer.
How about just calling cider-eval-last-sexp?
And what's your use case for evaling expression in normal mode in the REPL buffer?#2020-06-1507:32jumar(Basically anything that works in the standard buffer should work in the repl buffer too)#2020-06-1507:33Yehonathan SharvitWhen I press arrow key up I am able to traverse the history of commands evaled in the REPL#2020-06-1507:33Yehonathan SharvitI am in normal mode#2020-06-1507:33Yehonathan Sharvitcider-eval-last-sexp works in the REPL buffer but it is a bit weird as it doesnāt create a new line in the REPL#2020-06-1507:34Yehonathan SharvitWhat I could do is use arrow key up in insert mode (with Ctrl-UP )#2020-06-1507:35Yehonathan SharvitBut quite often I need to go to the buffer REPL for a brief moment, re-execute the previous expression and move back to the previous REPL#2020-06-1507:36Yehonathan SharvitFor instance, I run (reset) from component#2020-06-1509:58jumarIf you really care about getting the same thing as if pressing Enter manually you could also use cider-send-last-sexp-to-repl (`, s e` ) - but it's a bit weird in the REPL itself since it duplicates the expression.
the ,e w might be interesting too#2020-06-1511:54flefikissnāt it , e f?#2020-06-1513:11jumarBy , e w I meant cider-eval-last-sexp-and-replace#2020-06-1513:45practicalli-johnny@U0L91U7A8 RET in the REPL buffer using Evil normal state should evaluate the current expression. If you have to change to insert mode then perhaps something is incorrect with your setup.
C-k and C-j in the REPL buffer in Evil insert state will scroll through REPL buffer history. These keys are very common for scrolling through lists in Spacemacs (e.g. helm lists)
Is there something stopping you from just evaluating the code in the source code buffers? I find the REPL buffer experience quite limited, especially as it requires switching namespaces or require namespace or provide fully qualified names.#2020-06-1516:07Yehonathan Sharvit@U05254DQM usually I eval expressions from source code buffers. But from time to time, I need to eval expressions form the REPL buffer#2020-06-1516:09Yehonathan Sharvit@U05254DQM any idea why RET doesnāt work? I just noticed that \ RET works.#2020-06-1516:11Yehonathan SharvitRET is bound to evil-ret#2020-06-1516:37practicalli-johnnyAre you on an older version of CIDER or Spacemacs? I am using CIDER 0.25.0 (Bergamo) and updated Spacemacs and packages a few days ago.#2020-06-1516:38practicalli-johnnyOtherwise maybe there is something in your dotspacemacs/user-config in .spacemacs that configures CIDER to behave differently. I believe you can configure multi-line support, but I think that only affects what RET does in Evil insert (so you can have mutiple lines).#2020-06-1516:40practicalli-johnnyI am assuming you are just jumping to the REPL to run the (reset) function, you can set up CIDER to drive components when refreshing the repl, so everything would be done in an existing keybinding. If that makes sense, I'll try dig out the code...#2020-06-1516:42Yehonathan SharvitI am very eager to learn how to let CIDER drive components when itās requiredā¦#2020-06-1516:43practicalli-johnnyThis is what I've learnt so far, its not extensively tested, but should get you close https://practicalli.github.io/spacemacs/clojure-repl/component-lifecycle.html
Let me know if the .dir-locals.el setup works for you and if you have better examples of using component to share š#2020-06-1513:52Drew VerleeI take it its possible to set functionality on a per projectile basis? things like:
(setq clojure-indent-style 'align-arguments)
(setq clojure-indent-style 'always-indent)
i'll follow up in this thread when i figure out how.#2020-06-1514:23practicalli-johnnyI assume this would be done in a .dir-locals.el file if its on per projectile basis#2020-06-1514:25practicalli-johnnyNot dissimilar to this I guess https://practicalli.github.io/spacemacs/clojure-projects/monorepo-nested-projects.html#2020-06-1514:26practicalli-johnnyor defining default aliases to include for deps.end projects as in this article https://practicalli.github.io/blog/posts/cider-jack-in-to-clojure-cli-projects-from-spacemacs/#2020-06-1606:32Ho0manHi everyone, I have set dotspacemacs-smartparens-strict-mode to t but when ever I try to
arrange the long key into multiple lines the whole map gets distorted like this - (I'm using the excellent init.el provided in @jr0cketās https://github.com/practicalli/spacemacs.d)#2020-06-1606:32Ho0manIt was like this before pressing new-line on the key line :#2020-06-1608:17practicalli-johnny@U6CE37RK6
Looks like the auto align form configuration.
Insert a new empty line in between SPA-status and user lines, then they won't align themselves.
Then you can change the SPA-status line without the other lines changing automatically#2020-06-1612:02Ho0manThanks a lot#2020-06-1612:44practicalli-johnnyI should add a section on this to the Spacemacs book, so thanks for asking#2020-06-1712:09Drew Verleeauto align is great, tell you open the 99% of projects that dont use it and you have to turn it off. i wouldn't recommend it outside setting up a formatting for a project that you can enforce.#2020-06-1712:12practicalli-johnnyOr you can just do one commit specifically to format all the code in the project. I find this far more readable and one of the biggest improvements to understanding the code quickly.#2020-06-1718:47Mario C.I use this command to compare the file in my current buffer to the same file on another branch. C-c M-g D r after typing that out I can enter a branch name. Id like to map that command into SPC o g d in which it will then allow me to enter the branch name. How can I do this? I have something like this so far.
(spacemacs/set-leader-keys "ogd" 'compare-to-branch)
And
(defun compare-to-branch ()
"Compare file in buffer to branch specified."
(interactive)
(letrec ((profile (read-string "Enter branch name: "))
(lein-params (concat "with-profile " profile " repl :headless")))
(message "lein-params set to: %s" lein-params)
(set-variable 'cider-lein-parameters lein-params)))#2020-06-1718:48Mario C.The compare-to-branch is a copy n paste from another function in there which is why there is unrelated code. I want to see what changes I need to accomplish what I'd like to do#2020-06-1718:51Mario C.(defun compare-to-branch ()
"Compare file in buffer to branch specified."
(interactive)
(letrec ((branch-name (read-string "Enter branch name: ")))
(magit-file-dispatch)))#2020-06-1719:12Mario C.I got it working with this
(defun compare-to-branch ()
"Compare file in buffer to branch specified."
(interactive)
(letrec ((branch-name (read-string "Enter branch name: ")))
(magit-diff-range branch-name)))#2020-06-1813:36Drew VerleeIs there a way to know what you can call on a java class from emacs with clojure mode? i haven't touched java in a while. i recall lgiven a .java file and a tool like intelliji this is possible, but i'm guess the answer is a hard no this context š#2020-06-1813:48practicalli-johnny@drewverlee there is a very nice looking Java LSP package here https://github.com/emacs-lsp/lsp-java Not what you were specifically asking for, but may be of interest if working with Java directly.
I can navigate the Java source code from clojure-mode, but havent looked at any kind of call tracing. Not sure what cider-debug does if an instrumented function includes a call to a java class.#2020-06-1816:23Drew VerleeI think it would probably be enough if selecting a class and opening javadocs worked for every class. but that might only work in cases where the class set it up to work. i'm just starting to look into the limitations. i read about this a long time ago but it didnt stick bc i never had to really deal with it.#2020-06-1909:03jumarYeah, this doesn't really work properly. You need to add sources and javadocs for all the 3rd party deps manually and for me even that never really worked; especially because I'm using Java 11+ on a daily basis#2020-06-1912:51Drew VerleeI'm thinking the solution is to use intelliji when ever I have to touch Java#2020-06-1900:28practicalli-johnnyThe only thing I have done with Java is navigate the source definitions of methods, using this alias for deps.edn projects https://practicalli.github.io/spacemacs/navigating-code/java-definitions.html
Let me know if there are any example projects that would be useful to try out#2020-06-1900:30practicalli-johnnyOh and of course there is auto-completion for java methods in clojure-mode, although I havent tested how extensive this is. Seems to work for most of the methods I call (eg. java.util.UUID/randomUUID)#2020-06-2023:31Drew VerleeCljr refactor add project breaks on deps.edn projects more times then it passes. Is anyone constantly using it?#2020-06-2101:00ASYeah it's broken for java 9+ because of changes in the classpath loader. You just have to restart your repl (or use https://github.com/clj-commons/pomegranate).#2020-06-2101:04AShttps://github.com/clojure-emacs/refactor-nrepl/issues/206#2020-06-2208:27teodorluAnyone know how to paginate back in the CIDER inspect buffer?#2020-06-2208:28teodorlun paginates forward. p and N do not go back. CIDER docs says use SPC and M-SPC to go back and forth, but Spacemacs seems to override those.#2020-06-2208:54teodorluHuh, I was wrong. M-SPC does seem to work.#2020-06-2208:54practicalli-johnnyp was working for me last month in Evil normal state. L to go back to up to a parent expression https://practicalli.github.io/spacemacs/evaluating-clojure/inspect.html#2020-06-2208:55teodorluIt seems like N is supposed to work, but I'm seeing errors in my messages buffer:
> command-execute: Wrong type argument: commandp, cider-inspector-previous-page [4 times]#2020-06-2208:57teodorluThanks, @U05254DQM! p doesn't seem to work for me, I'm seeing the following message:
> funcall-interactively: Buffer is read-only: #<buffer cider-inspect>#2020-06-2209:03practicalli-johnnyStrange, I just ran the inspector and p and N both page backwards (one you have paged forwards).#2020-06-2209:03practicalli-johnnyIs the inspector buffer in Evil normal state? It should be by default
It seems like your p is trying to paste into the buffer, so maybe there is a bug. Nothing has changed with the Clojure layer in Spacemacs develop for a while though. If you are on Spacemacs master then perhaps there is a bug only fixed in develop.#2020-06-2211:10teodorlu> Is the inspector buffer in Evil normal state?Ā It should be by default
When I M-x evil-normal-state within the inspect buffer and press n, I get a "SOMETHING": pattern not found, seeming to search for SOMETHING.#2020-06-2211:11teodorluI'm on master -- perhaps it makes sense to move to develop.#2020-06-2214:52bartukahi.. how can I disable the spacemacs theme and stick with the standard emacs -Q one?#2020-06-2220:03practicalli-johnnyDoes emacs -Q use a specfic theme? If so then add the name of that theme to dotemacs-themes in .spacemacs .
Otherwise use SPC T s to select themes, using C-c C-f to preview each theme while the helm list of themes is open. Then select the theme that is closest to the original theme.#2020-06-2220:04practicalli-johnnyI believe the theme is called default , so set that in .spacemacs.#2020-06-2223:38bartukaFor some reason i feel they are different. I did a disable-theme on my user-config#2020-06-2223:38bartukaI am on vacations and trying spacemacs for the first time hehehe.. your blog has several nice tips, thanks @U05254DQM#2020-06-2223:39bartukaI still thinking if its worth the effort of learning spacemacs... the bindings seems like very thought out!#2020-06-2310:21practicalli-johnnyI've added a note about disabling custom themes to get the classic Emacs colors, so thanks for letting me know how you configured it. https://practicalli.github.io/spacemacs/install-spacemacs/themes.html#2020-06-2304:11jumarIs there a way to disable CMD + Q shortcut on Mac or to make it ask for confirmation before exiting emacs?#2020-06-2308:12practicalli-johnnyCan you bind those keys to another function in your Emacs config?
Is it the OSX layer setting that binding? The docs suggest it's so (I don't understand the different Mac keys, so may have read this wrong)#2020-06-2308:36jumarThanks for the suggestion! confirm-kill-emacs variable seems to be a good workaround š#2020-06-2414:24practicalli-johnnyI've added pages on how to configure the default remote for pushing changes and the default upstream remote branch.
https://practicalli.github.io/spacemacs/source-control/magit/remote-repositories/configure-default-push.html
https://practicalli.github.io/spacemacs/source-control/magit/remote-repositories/configure-default-upstream.html#2020-06-2515:46murtaza52the following blog - http://jr0cket.co.uk/2016/07/YASnippets-for-faster-clojure-development.html
mentions that the ns get added when a new file is created, this used to work for me some time back, but currently does not happen, any leads on what could be the issue ?#2020-06-2516:37practicalli-johnnyYes, it is clj-refactor that automatically adds the namespace when creating a new file.
There is an ns snippets, so if you type ns then expand it will populate with the current namespace.
Both need the REPL running to work.#2020-06-2516:38practicalli-johnnyhttps://practicalli.github.io/spacemacs/snippets/clojure-snippets.html#2020-06-2516:38practicalli-johnnyThis is more up to date than the blog post#2020-06-2905:22murtaza52thanks that worked I did not know about M-/ for completions. I need to read up on the clj-refactor for spacemacs.#2020-06-2516:19murtaza52I installed spacemacs on a new machine, and I keep getting the below error -
Starting new Ispell process /usr/bin/aspell with default dictionary...
Error enabling Flyspell mode:
(Error: No word lists can be found for the language "en_US".)
How do I configure flyspell ?#2020-06-2516:41practicalli-johnnyNot sure if it's flyspell error or if the binary flyspell uses, e.g aspell.
I would first check aspell or similar is installed and runs on the command line, then check the path of that command and that Emacs is using the path the spelling binary is on.#2020-06-2516:44murtaza52ok this really strange, I have a new clj project, and in that when I try to navigate the file Spc p f, it shows all files starting with ./src/.... basically add files and dirs are prepended with`./`, this is also causing the .gitignore rules to be ignored.#2020-06-2516:45practicalli-johnnyDid you change to the develop branch when installing Spacemacs? Just a thought.#2020-06-2516:54practicalli-johnnyOr maybe some packages didn't download properly. Try restarting Emacs and check the message buffer#2020-06-2516:54murtaza52yes its on the develop branch , just checked it#2020-06-2517:05murtaza52restarted, created the project again from a template, same problem.#2020-06-2517:05murtaza52the problem is only with this project ..#2020-06-2517:08practicalli-johnnyWhat command is used to create the project? I assume the template used contains a .gitignore file#2020-06-2517:11murtaza52clj -A:new dv.fulcro-template com.sevenolives/hisaab +all#2020-06-2517:19practicalli-johnnyI get the same as you, very strange#2020-06-2517:33practicalli-johnnyI tried setting it to a clojjure project with a .dir-locals.el file but id didnt make any difference. I dont have any other ideas.
Maybe asking in the #emacs channel as to why projectile would add leading ./ to its output for a particular project#2020-06-2517:41murtaza52thanks for trying it out#2020-06-2918:41practicalli-johnnyThere are a lot of ways to easily configure the CIDER experience and these are covered in the http://docs.cider.mx pages. I created a reference page for all the configuration variables as a way to quickly look them up.
https://practicalli.github.io/spacemacs/reference/cider/configuration-variables.html
CIDER Variables can be applied to all projects by adding them to the clojure layer as layer variables, or in dotspacemacs/user-config section of .spacemacs. For project specific configuration. add these vairables to a .dir-locals.el in the root of a Clojure project.
https://practicalli.github.io/spacemacs/clojure-projects/project-configuration.html#2020-06-2918:42practicalli-johnnyYou can also use SPC SPC customize to set these CIDER variables, which will add changesto the end of the .spacemacs file#2020-06-3000:52lreadthanks @jr0cket!#2020-07-0206:15jumarSharing here - maybe someone has a good tip how to make this faster: https://clojurians.slack.com/archives/C0617A8PQ/p1593590912213400#2020-07-0206:15jumarjumarĀ Ā [3:05 PM]
My problem is that Emacs/Cider is just really slow in this case - in terminal itās fine but Emacs will freeze for up to a minute while waiting for the output to be written to the repl buffer; the process that generates this output only takes several seconds#2020-07-0206:24practicalli-johnnyIf the log messages have long lines (which is common) then Emacs is going to be slow.
Disabling font locking (if enabled) may make it not quite so slow, e.g by putting a buffer into fundamental-mode. Although I doubt much difference will be noticed.
My only advice is to log to a rotating file or send logs as objects directly to a proper logging tool like Elastic search/Kibana.
If that's not possible, avoid using the REPL buffer directly.#2020-07-0206:30jumarThe log messages are NOT usually very long but there are quite a few of them (TRACE logging) and I have font locking disabled.
I tried to set the REPL buffer mode to fundamental-mode but it just broke.
In general, I should probably write to a separate log file but it's just much more convenient (and the default production setup anyway) to log to STDOUT; also in this case I was debugging an issue which only happened with TRACE logging enabled and written to stdout.
What do you mean "avoid using the REPL buffer directly"?#2020-07-0206:32jumar(Btw. another time when it gets noticably slower is when a larger data structure (such as ring request) is printed into the REPL - and it can be quite convenient to be able to copy this structure and use it for experiments; although I understand that in many cases I can just use def or perhaps dump it to an edn file too)#2020-07-0206:35practicalli-johnnyFrom a quick internet search, I found this minor mode that may be worth a try (I haven't tried it). If it works it would be better than switch ING to fundamental-mode
https://github.com/rakete/too-long-lines-mode#2020-07-0206:49jumarThanks I'll have a look at it.#2020-07-0209:10dev4openidWhen I open spacemacs I receive this message:
Skipping check for new version (reason: dotfile)
custom-initialize-reset: Creating directory: Permission denied, /path#2020-07-0209:11dev4openidHow can I diagnose this?#2020-07-0209:14practicalli-johnnyI suggest looking at the docs for that function, SPC h d f custom-initialize-reset to see what it does. If it's from a Spacemacs layer, then check if the documentation mentions it#2020-07-0209:15practicalli-johnnyI think Spacemacs only creates files / directories in elpa (for packages) .cache and private (both under .emacs.d). I assume you have checked read write permission on .emacs.d directory.#2020-07-0209:16practicalli-johnnyMost likely it's some package that is trying to write somewhere. The docs should say which file it's in.#2020-07-0209:16dev4openidthe help does not list SPC h d f custom-initialize-reset#2020-07-0209:19practicalli-johnnySPC / with a file open from inside .emacs.d ??
If nothing found, did you add something to .spacemacs#2020-07-0209:19dev4openidI looked at .emacs.d I have group permissions under my name XXX as R&W however the access is granted none.
If I grant access R&W it must be recursive?#2020-07-0209:23dev4openidWell I changed permissions and now the SPC h d f custom-initialize-reset provides data#2020-07-0209:27dev4openidFrom the help, the custome.el. link led to custom.el.gz file
(defun custom-initialize-reset (symbol exp)
"Initialize SYMBOL based on EXP.
Set the symbol, using its `:set' function (or `set-default' if it has none).
The value is either the symbol's current value
(as obtained using the `:get' function), if any,
or the value in the symbol's `saved-value' property if any,
or (last of all) the value of EXP."
(funcall (or (get symbol 'custom-set) #'set-default-toplevel-value)
symbol
(condition-case nil
(let ((def (default-toplevel-value symbol))
(getter (get symbol 'custom-get)))
(if getter (funcall getter symbol) def))
(error#2020-07-0209:27dev4openidNow I do not have custome-init...... in my .spacemacs file#2020-07-0209:28practicalli-johnnyNo need to paste in the function source, it looks like a function that comes with Emacs.#2020-07-0209:28dev4openidYes, but it has no reference in .spacemacs and this messgae is persistent#2020-07-0209:28practicalli-johnnyIt seems its just a permissions issue with your .emacs.d directory, make sure you can read/write and create files and dirs recursively#2020-07-0209:29practicalli-johnnyOh, so you rebooted after updating the .emacs.d file permissions? If so, you have really broken something badly#2020-07-0209:30dev4openidBi I did not reboot#2020-07-0209:30dev4openidI have permissions to create files etc in .emacs.d#2020-07-0209:31dev4openidemacs generally works fine however I have this darn message#2020-07-0209:36dev4openidI updated the emacs version and updated all packages - seems fine but same error message#2020-07-0209:40practicalli-johnnyUnless you know what you changed before getting this message, I would wipe .emacs.d and .spacemacs and start again. I cant help if I dont know what has been changed. Alterntatively, raise an issue on Spacemacs github repository with SPC h I , that will provide info about your system and layers used.#2020-07-0209:40dev4openidI can add/create recursively files in emacs.d
I have/can update packages without problems. I have updated with git pull --rebase the emacs
I can emacs edit files and run cider
BUT I cant resolve this message for some reason. I am not sure as to how it is even referred to#2020-07-0209:41dev4openidOK start again š°#2020-07-0209:44dev4openidthx @jr0cket#2020-07-0210:00practicalli-johnnyAs the error message is from a built in Emacs function, then it seems likely that something is calling that function incorrectly. As the error message doesnt show where that call is from or give any clues as to the path its trying to write, then isolating the issue is going to be tricky.#2020-07-0314:44Drew VerleeDoes anyone get filepath completion in clojure mode for things no the classpath? i want to be able to have auto discover and complete in these situations
(-> "resources" io/file .isDirectory)
;; => true
(utils/load-edn "resources/*")
where my cursor is on the * it should show me the files in resources when i hit tab.#2020-07-0317:10practicalli-johnnyDoes M-/ work, instead of TAB ?? That might only use paths already used (and stored in Spacemacs cache some where, but just guessing)
I've noticed file popups before when using http://clojure.java.io/resource in some of the data science projects, but wasnt paying enough attention, sorry.#2020-07-0515:46Drew VerleeM-/ does work. Thats great thanks#2020-07-0506:49murtaza52When I do Spc Spc and search for an fn in helm, the typed fn appears multiple times. So lets say I called clojure-align , the first time it appears 3 times, next time when I call it appears 4 times.
It seems any fn that I call in emacs, next time it appears +1 times in the helm menu. I guess this is also slowing down emacs quite a bit. Any leads on what is wrong ?#2020-07-0513:45kirill.salykinseems like it is treated as history, i find it annoying as well, dunno how to disable it unfortunately :( let me know if you ll find the answer#2020-07-0513:57practicalli-johnny@murtaza52 @kirill.salykin The brute force approach is to delete .emacs.d/.cache/savehist file. This must be done when Emacs is NOT running.
You could also try deleting the duplicated commands from this file, however, if you do this in Emacs it will add them back in again as it seems they are in the Emacs memory.
There was a change to the helm packages that seems to be the root cause. Once a clean savehist file is created by running Emacs again, I have not experience the issue.
There were some variables to try and remove duplicates, but I never got these to work. I can share these if needed.#2020-07-0515:57kirill.salykinthanks!#2020-07-0606:41kirill.salykindeletion of savehist worked like a charm. thanks!#2020-07-0513:57practicalli-johnny@murtaza52 @kirill.salykin The brute force approach is to delete .emacs.d/.cache/savehist file. This must be done when Emacs is NOT running.
You could also try deleting the duplicated commands from this file, however, if you do this in Emacs it will add them back in again as it seems they are in the Emacs memory.
There was a change to the helm packages that seems to be the root cause. Once a clean savehist file is created by running Emacs again, I have not experience the issue.
There were some variables to try and remove duplicates, but I never got these to work. I can share these if needed.#2020-07-0514:16kirill.salykinplease share, thanks!#2020-07-0514:27practicalli-johnnyhttps://github.com/syl20bnr/spacemacs/issues/13564 has the other approches...#2020-07-0514:30practicalli-johnnyI tried (setq history-delete-duplicates t) in dotspacemacs/user-conf but it didnt work. Upgrading the helm packages and deleting savehist was the simplest approach and it actually worked. Looling at the savehist file there wasnt anything important in there, so quickest approach it to just delete (when Emacs is not running).#2020-07-0515:57kirill.salykinthanks#2020-07-0611:57practicalli-johnnyRaised an issue to discuss if http://spacemacs.org should add a develop install to the main http://spacemacs.org website. Would appreciate your feedback on that issue (post comments on the issue rather than here)
https://github.com/syl20bnr/spacemacs/issues/13748#2020-07-0710:34practicalli-johnnyI've created a pull request to add a few clojure-mode refactor keybindings for namespaces. As its clojure-mode these work even without the REPL running. The key bindings should not conflict with clj-refactor (if that projects documentation is correct).
SPC m r a n insert a namespace form at the beginning of the buffer
SPC m r a N insert a namespace form at point
SPC m r s u sort included namespace names within the ns form (e.g. sort required namespaces by alphabetical name)
https://github.com/syl20bnr/spacemacs/pull/13755#2020-07-0711:03flefikwouldn't it be nicer if the linter did the last item for you?#2020-07-0711:18practicalli-johnnylinters are intended to show issues rather than change code and I would prefer it remained that way š
Refactor tools are intended to change code.
I also prefer to sort namespaces by purpose, especially as the number of referred namespaces increases. It makes refactoring a (legacy - i..e anything I haven't worked on for a few weeks) project so much easier.#2020-07-0711:25flefik> linters are intended to show issues rather than change code and I would prefer it remained that way
having the dubious pleasure of working with golang lately, the only saving grace is the fact that the linter fixes lots of formatting and small issues for you automatically on file save.#2020-07-0711:30practicalli-johnnyThat sounds really annoying to me I am afriad#2020-07-0711:31practicalli-johnnyI pushed some docs on the new keybindings to the Practicalli Spacemacs book, although you will have to grab the PR or wait for it to be merged to use the key bindings. The commands already exist though.
https://practicalli.github.io/spacemacs/refactor/namespace-definitions.html#2020-07-0714:15mccraigmccraigi just found myself want to access the kill-ring from within the minibuffer (for replace-string), and while i could use M-x helm-show-kill-ringi wasn't able to use the spacemacs menu M-SPC r y (i'm using holy-mode with a M-SPC leader key) - anyone have any idea why this should be ?#2020-07-0715:10practicalli-johnny@mccraigmccraig Running SPC SPC replace-string followed by M-m r y I do get helm showing the kill ring. I have the default M-m as the leader key that works in any state, holy or evil. Using Spacemacs develop and packages updated in the last couple of days.
C-y pulls the latest value from the kill ring and puts it in the mini-buffer or in a helm prompt.
There have been a few changes in helm over the last month. If you updated Emacs packages then that may have changed something (just a guess).#2020-07-0715:37mccraigmccraigwhat's the symbol for the any-state leader-key @jr0cket? is it just dotspacemacs-emacs-leader-key ?#2020-07-0716:57practicalli-johnny@mccraigmccraig I believe so. Emacs (holy) keys are always available unless over-ridden by Evil states#2020-07-0716:59practicalli-johnnyMy Spacemacs config is in this repo if you want to compare anything https://github.com/practicalli/spacemacs.d#2020-07-0717:05mccraigmccraigthanks @jr0cket#2020-07-0721:24Drew VerleeDoes anyone use intelliji and spacemacs? I'm going to setup intelliji this weekend so i can see how the java interopt changes my workflow.#2020-07-0806:10jumarYou mean using both of them simultaneously? I use Intelij mostly for DB navigator and ocassional browsing through Java source code (e.g. clojure.lang); and very rarely for debugging clojure itself
I use spacemacs for most of my Clojure development.#2020-07-0915:09Drew VerleeYes, i suppose i mean simultaneously. I'm going to try the work flow your suggesting. Though now that i'm getting more comfterable with whats possible, it seems i'll need to use google and javadocs enough that intelliji isn't as clear a win as I thought for interopt.#2020-07-0915:10Drew Verleedoes anyone have a trick to easily just show git information in magit so i can copy it to other buffers? using clojure deps means its nice to have a convient way to copy sha's and repo information and i find myself leaving emacs to do this just because i dont' quickly know how to get a buffer with the remote origin info that i can copy. its like right there but the buffer does't let me copy it out lol.#2020-07-0915:14practicalli-johnny@drewverlee SPC f f .git/config will get you a buffer with the URL of the remote. Or in Magit status buffer, ! ! git remote -v
Or just y in the magit status buffer, then y y on the remote line#2020-07-0915:19Drew VerleeAwesomeness#2020-07-0915:20practicalli-johnnyI like y in magit status buffer to show refs, never noticed that before, quite handy.#2020-07-0923:26Gleb PosobinHow do I automatically open several workspaces at spacemacs startup and open certain files in each of them?#2020-07-1009:22practicalli-johnnyThere is an existing setting in .spacemacs to restore layouts. It will remember which files you had open and open them on restart. If you SPC l s to save it will open layout on start.
Process buffers will not be restored.
;; If non-nil then the last auto saved layouts are resumed automatically upon
;; start. (default nil)
dotspacemacs-auto-resume-layouts t
#2020-07-1016:25Gleb PosobinThe problem is that spacemacs or my laptop sometimes hang/restart.#2020-07-1016:26Gleb PosobinAnd that happens every couple of days.#2020-07-1016:26Gleb PosobinAlso, it restores layouts, not workspaces?#2020-07-1020:29practicalli-johnnyIf you create workspaces and dont save the layout, then it wont restore the workspaces if Emacs crashes. I only use one workspace in one of my layouts, so dont know if there is another way. Sorry.#2020-07-1017:08Drew Verleecan you easily unset an system env? i can edit my spacemacs.env to remove an env. but if i load that then restart my repl i get the value still.#2020-07-1020:14practicalli-johnnyTry setting the env to no value in the spacemacs.env file, hopefully that will over-ride where ever the env is set.
Otherwise I think restarting Emacs or even the OS is required, depending where the env is set#2020-07-1104:24jumarThereās setenv you may call I think; perhap even āunsetā variant (donāt remember)#2020-07-1201:52Drew VerleeThanks. I'll give it a try again. I didn't see an unset option.#2020-07-1121:00dvingoI'm trying out spacemacs, I'm on macos - the program will not quit. I have to force kill it. Is this expected?#2020-07-1121:54practicalli-johnnySounds strange. If you are not using the Spacemacs develop branch, I recommend you update to that version, it has a lot of fixes.
https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html#2020-07-1200:59rbergerI just had a weird problem where i wanted to switch to develop and use the practicalli spacemacs but with holy mode. On macOS 10.15.5 . Tried it with emacs-plus 26, 27 and 28 thinking that it was something wrong with my emacs install.
It would keep giving me errors like
Toggle: evil-safe-lisp-structural-editing "This toggle is not supported"
And would keep hanging hard. Couldnāt sudo kill -9 or force quit. Eventually got rid of the practicalli .spacemacs.d and used the default (with holy mode) and my old .spacemacs.d and its working fineā¦
I donāt have time right now to debug further but will later. Will try again with a vanilla practicalli .spacemacs.d
But Iāve never seen Emacs not be able to be force quit before#2020-07-1121:03dvingoahh sp - q - Q did it#2020-07-1200:59rbergerI just had a weird problem where i wanted to switch to develop and use the practicalli spacemacs but with holy mode. On macOS 10.15.5 . Tried it with emacs-plus 26, 27 and 28 thinking that it was something wrong with my emacs install.
It would keep giving me errors like
Toggle: evil-safe-lisp-structural-editing "This toggle is not supported"
And would keep hanging hard. Couldnāt sudo kill -9 or force quit. Eventually got rid of the practicalli .spacemacs.d and used the default (with holy mode) and my old .spacemacs.d and its working fineā¦
I donāt have time right now to debug further but will later. Will try again with a vanilla practicalli .spacemacs.d
But Iāve never seen Emacs not be able to be force quit before#2020-07-1205:26practicalli-johnnyIn the practicalli/spacemacs.d configuration you can comment the (spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hooks) if using holy mode only.
The configuration is optimised for Evil mode and not tested at all in holy mode, so suggest just using it as an example and just copy anything that seems useful.
Some of the layer variables may be the only thing to copy. There may be some general package tweaks in dotspacemacs/user-config.
Additional keybinding will not likely be useful in holy mode.#2020-07-1213:43dvingoI am trying to get a shadow-cljs repl connection working in a tools cli project. I have tried using cider-jack-in-cljs -> shadow -> :main
And when I do that I get:
1. Unhandled clojure.lang.ExceptionInfo
missing instance
{}
runtime.clj: 11 shadow.cljs.devtools.server.runtime/get-instance!
runtime.clj: 8 shadow.cljs.devtools.server.runtime/get-instance!
api.clj: 122 shadow.cljs.devtools.api/worker-running?
api.clj: 120 shadow.cljs.devtools.api/worker-running?
api.clj: 206 shadow.cljs.devtools.api/watch
api.clj: 200 shadow.cljs.devtools.api/watch
api.clj: 204 shadow.cljs.devtools.api/watch
api.clj: 200 shadow.cljs.devtools.api/watch
REPL: 1 user/eval66677
My understanding is that jack-in is supposed to start the shadow worker process, so this is confusing.
I have also tried starting the shadow-cljs server on the command line and then using cider-connect-cljs specifying: localhost -> 9000
(shadow has an nREPL server there:
shadow-cljs - nREPL server started on port 9000)
I see a message "connection established"
I then open a cljs file and issue: cider-switch-to-repl-buffer and I get "No cljs REPLs in current session.."
Anyone have any pointers for where to go from here?#2020-07-1213:53dvingodo I have to add piggieback and cider-nrepl to my deps.edn file? It's not clear from the docs if this is required or if cider will inject them for you#2020-07-1214:04practicalli-johnnyIt's been mentioned in the #cider channel previously that running cider-jack-in-cljs should work, assuming shadow-cljs is configured correctly.
Suggest asking in the #shadow-cljs channel as quite a few people seem to struggle getting this working (I haven't tried)#2020-07-1214:09dvingoi think i got it! - I added the middleware deps to deps.edn seems to work now..#2020-07-1214:15dvingoerr, nvm almost there I 'll ask in the other channels#2020-07-1214:16practicalli-johnnyDid you add cider-nrepl ? https://shadow-cljs.github.io/docs/UsersGuide.html#user-config#2020-07-1214:18dvingoso things work if I don't start a clojure repl first - I can connect to a shadow cljs repl
but when I start a repl via clojure first I get prompted with that "use existing session?" msg and cider also doesn't show the shadow-cljs nrepl port (which it does if I don't start the clojure repl)#2020-07-1214:19dvingoI did add cider-nrepl and that got things working with shadow#2020-07-1919:54Drew Verlee@U051V5LLP I posted about this is in reddit. With a dir locals configured to use shadow. And shadow pointing at deps. You can run cider Jack in and everything gets injected and shadow starts a server. There is as warning about refactor nrepl though, but that's something you can choose to ignore. It even works...
I posted a more complex alternative to.#2020-07-2013:18dvingoThanks for the info - I managed to get a repl working with shadow and clj - things work if I connect to the shadow repl first and then jack-in to a clj repl. But they don't work if I start the clj repl first.#2020-07-2014:33Drew Verlee@U051V5LLP you should only be running cider-jack-in-cljs which starts an nrepl server and connects the editor client to it. OR starting an nrepl server some other way (shadow watch app) and using cider-connect-cljs to connect to it.#2020-07-2015:12dvingohey - so I cider-connect-cljs to a shadow watch process - but I also have a clojure backend which is a separate nrepl process#2020-07-2015:13dvingoso cljs files should send forms to the shadow managed nrepl and clj files should send forms to the clj nrepl process#2020-07-2015:20Drew VerleeIn the case when you have two seperate applications then yes, you want two nrepl servers.#2020-07-1214:33murtaza52When I try starting nrepl on one of the clj projects, I get the following error -
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Downloading: org/openjfx/javafx-base/13/javafx-base-13-linux.jar from datomic-cloud
(I am on manjaro linux) I also tried installing openjfx, however the problem is still there.#2020-07-1214:42practicalli-johnnyLooks like you are running Java 13, maybe some of the libraries you are using are not happy on that version. Try Java 11 or Java 8.#2020-07-1215:46murtaza52@U05254DQM thanks, installed java 8, and its working like a charm !#2020-07-1215:47murtaza52just for my understanding why would it give me java fx error with java 14 ?#2020-07-1219:13practicalli-johnnyIn a nutshell, Java module system was introduced in Java 9. This changed the way Java was structured internally and not everything in the JVM world has caught up with such a significant change. Somewhere between 8 and 11 the Java FX library was split off, so is no longer part of the base Java install. For example, if you are using Cognitect REBL tool, you need to explicitly specify Java FX libraries, if using Java * then the Java FX libraries are built in.#2020-07-1219:16practicalli-johnnyJava 11 is the current long term support version of Java, so I would recommend using either 8 or 11. Using Java 14 is only valuable if you want to try out new features in Java or that version of the JVM. The Java roadmap has more details if you are interested https://www.oracle.com/java/technologies/java-se-support-roadmap.html#2020-07-1520:25murtaza52@U05254DQM thanks for the info#2020-07-1218:33RichardI updated spacemacs today (developer branch) and now I have some dots marking the indentation of my headings. Does anyone know how to remove them or replace with spaces, please? I'd still like it to indent.#2020-07-1218:49practicalli-johnny@richard The org layer changes to org-superstar package, there seems to be a setting to change the leading stars to space, which says it will effectively hide the leading starts https://github.com/integral-dw/org-superstar-mode#hide-leading-stars#2020-07-1220:01RichardNice! Worked a treat, John. PS. I always check your https://practicalli.github.io/spacemacs/install-spacemacs/update.html tutorial before I ever do an update. Thank you.#2020-07-1309:39practicalli-johnnyNew in Spacemacs develop in the Clojure layer:
Add key bindings to refactor namespace forms for existing functions in clojure-mode
"ran" 'clojure-insert-ns-form
"raN" 'clojure-insert-ns-form-at-point
"rsn" 'clojure-sort-ns#2020-07-1412:13taka2I changed my config so that I can use "jj" instead of "esc", but I noticed that I had to press the key so quickly. I want to delay the input grace. How can I do it?#2020-07-1412:15Richard(setq-default evil-escape-delay 0.5)#2020-07-1412:16taka2Thanks!#2020-07-1412:17RichardYou're welcome. I use ',.' to do the same.#2020-07-1412:17Richard(setq-default evil-escape-key-sequence ",."
evil-escape-unordered-key-sequence "true"
evil-escape-delay 0.5)#2020-07-1412:18taka2What is "evil-escape-unordered-key-sequence"?#2020-07-1413:02RichardI can enter ,. or .,#2020-07-1413:02RichardIt doesn't matter for you if it's jj#2020-07-1414:33taka2I see.#2020-07-1516:29Drew VerleeQuick poll. When do you have to search by regex in clojure/clojurescript and why?
two examples:
⢠i use clj find in small clojure projects over regex bc its more direct. I cant use it on clojurescript (not supported)
⢠i just discovered cider-find-var (whatever that does) works in clojurescript.#2020-07-1518:20practicalli-johnnycider-find-var should jump to the definition of the var (e.g. def, defn name) under the cursor, or ask for a var name in the mini-buffer if the cursor is not on a var name.
, g g is bound to spacemacs/clj-find-var and will use the CIDER function when the REPL is running and dumb-jump-go without a REPL.#2020-07-1518:32practicalli-johnnyI use , g g - cider-find-var to jump to the definition of a function I am calling (the same key binding is in most language layers in Spacemacs).
For everything else I use helm-swoop , SPC s s within the current buffer or spacemacs/helm-project-smart-do-search , SPC / or SPC s p to search across projects.#2020-07-1518:37practicalli-johnnyI just noticed SPC s j (`lazy-helm/spacemacs/helm-jump-in-buffer`) which lists all the vars of the current buffer in a helm pop-up, selecting one jumps to that definition. It works on spec/def and clojure.test/deftest too, although not on spec/fdef (might need to get that added to Cider?)#2020-07-1519:17Drew Verleea version that lists every function in the current project would probably also be great. But this was useful, thanks @U05254DQM#2020-07-1610:14practicalli-johnnyI am trying out helm-imenu-in-all-buffers which lists all functions, defs and spec defs, grouped by namespace. If all the buffers are open for a project, then you will see all the functions
Obviously this brings in all the namespaces from all the buffers, so you get far more that you may want, but its in a helm popup and will narrow function names. Not quite there, but another useful tool.#2020-07-1617:32zaneSPC s j (also SPC j i) is fantastic.#2020-07-1712:20taka2Can I use paredit by installing clojure layer? And what is the key bindings of paredit?#2020-07-1715:16practicalli-johnnysmartparens is part of Spacemacs already and smartparens is a modern version of paredit.
smartparens are part of the built-in lisp state, SPC k , so to slurp SPC k s which leaves you in lisp state so you can do further smartparens actions with a single key press.
Smartparens works in all language major modes, not just Clojure.
Keybinding are covered here:
https://practicalli.github.io/spacemacs/structural-editing/lisp-state.html
Details of the layer can be found via SPC h l lisp-state or at https://develop.spacemacs.org/layers/+lang/emacs-lisp/README.html
If you are using Evil style editing, then enable Evil safe structural editing too https://practicalli.github.io/spacemacs/install-spacemacs/evil-structural-editing.html#2020-07-1715:20practicalli-johnnyparedit used to be included in the Clojure layer, but it has been removed. Even when paredit was included, no keybindings were included.#2020-07-1716:01practicalli-johnnyIt does seem that something is pulling in paredit package, but I do not know where from. I assume its one of the packages that the Clojure layer pulls in.#2020-07-1716:47taka2Oh...I didn't know smartparens. I'll try to use it. Thanks!#2020-07-1800:52Drew VerleeI thought smart parens just kept things balanced. I use lisp mode "spc k ." It's nearly the same as paredit. Imo, Do not waste time looking into other options.#2020-07-2113:43Kira McLeanHi, I just started using spacemacs and was wondering if anyone here might be able to answer my question. In cljc files only the clj parts are highlighted, cljs parts are greyed out. Iād like for them both to be highlighted at once. I can do that by setting the major mode to clojurescript, but was wondering if thereās a way to āturn onā highlighting for both targets in cljc files. Anyone familiar with clojurec mode have any insight?#2020-07-2113:52practicalli-johnnyThe only thing I found in the docs refers to the REPL, but maybe having a ClojureScript repl running would highlight both (just a guess)
https://docs.cider.mx/cider/0.25/cljs/up_and_running.html#working-with-cljc-files#2020-07-2113:56Kira McLeanI was wondering, that too. I tried keeping a cljs repl running, but doesnāt seem to do what I want.#2020-07-2113:56Kira McLeanAnd hi, by the way! Thanks for the great tutorials on spacemacs! Helped a lot with getting started.#2020-07-2113:58practicalli-johnnyHello and thanks. There are some options on the dynamic syntax highlighting page. I wonder if its specific things that are not highlighted, rather than all cljs code...
https://docs.cider.mx/cider/0.25/config/syntax_highlighting.html
Also the #cider channel has several maintainers of CIDER so they should know in general, assuming no answers are forthcoming in this channel.#2020-07-2113:59Kira McLeanah ok great, thanks. I wasnāt sure if it was an issue with my specfic config since Iām using spacemacs or something with cider generally.#2020-07-2114:03practicalli-johnnyIts not always obvious where the cause may be. If you can share the code I can give it a try in my Spacemacs setup.#2020-07-2114:04Kira McLeanAh that last link you sent is brilliant, it was this:
(setq cider-font-lock-reader-conditionals nil)
#2020-07-2114:04Kira McLeanmakes perfect sense once you know where to look! Thanks so much š#2020-07-2114:05practicalli-johnnyAh yes, I just found this issue with the same question, very useful to know. https://github.com/clojure-emacs/clojure-mode/issues/456#issuecomment-339931350#2020-07-2114:05Kira McLeanah great. yeah.. exact same question! Your google fu is better than mine. Thanks so much for the help! really appreciate it š#2020-07-2114:07Kira McLeanI wonder if starting the cljs repl didnāt work because of something else weird in my config.. I just connected to a shadow-cljs nrepl I always keep running.#2020-07-2114:09practicalli-johnnyseems many people find a few challenges using Cider and shadow-cljs together, there seems to be quite a few configs to set.#2020-07-2114:10Kira McLeanhm seems possibly related, then. Anyway not a big deal, maybe will investigate later. For now having the syntax highlighting working is great.#2020-07-2411:42jumarI'm not sure what happened but suddenly magit key bindings in spacemacs are broken. SPC g s is undefined , etc.
I haven't changed anything explicitly - the only thing that happened, I think, since it worked is that my computer ran out of battery and was turned off forcibly.#2020-07-2411:53jumarI tried to restore my .emacs.d from a backup two weeks ago but when I start emacs it shows "deleting 14 orphan packages" and I was able to see that one of them is evil-magit. Any idea why that happens?#2020-07-2411:54practicalli-johnnyI would start by checking the commands are still there, SPC SPC magit and see if the commands show the keybindings.
If the commands aren't there, then I'd delete the magit packages and restart Emacs#2020-07-2411:55jumarThe commands are there. But also magit-status doesn't work as before (no evil keybindings just standard emacs -> suggesting that evil-magit and possibly other packages are the problem)#2020-07-2411:57jumarWhen I try to install evil-magit manually (via package-list-packages) I get this error
Compiling file /Users/jumar/.emacs.d/elpa/develop/evil-magit-20200604.110/evil-magit.el at Fri Jul 24 13:57:14 2020
Entering directory '/Users/jumar/.emacs.d/elpa/develop/evil-magit-20200604.110/'
evil-magit.el:53:1:Error: Key sequence j p starts with non-prefix key j
#2020-07-2411:59jumarIt looked as if no magit package was actually installed.
I've just installed magit and then tried evil-magit - all other magit related packages are shown as "available" but not "installed" (not sure if that only means there's a new version)#2020-07-2412:00jumarAfter this change the emacs startup window shows again "deleting evil-magit"#2020-07-2412:00jumarAnd SPC g s still doesn't work#2020-07-2412:02practicalli-johnnyA possible quick hack would be to set dotspacemacs-install-packages 'all in .spacemacs which should keep all packages rather than deleting unused ones. This doesnt fix the underlying problem though.#2020-07-2412:03jumarWhat does it mean that a package is "unused"?#2020-07-2412:03jumarBtw. I ran a rather old version of develop branch and just tried to update to the latest origin/develop. This is what I get during startup now:#2020-07-2412:04practicalli-johnnyPackages that are not defined in an enabled layer or included in the addtional-packages setting I assume.#2020-07-2412:05jumarMaybe I should note I'm using Emacs 25.3 on Mac OS X 10.15.6#2020-07-2412:06practicalli-johnnyIs that the issue with older versions of Emacs? e.g. before 26.3. The RSA key for melpa was updated sometime before Emacs 26.3 and so earlier emacs versions need their key updated.#2020-07-2412:06practicalli-johnnyYes, it seems it is....#2020-07-2412:07practicalli-johnnyWhen I had a Mac, I used https://emacsformacosx.com/ to install Emacs. Or you can to an internet search on how to update the keys for Emacs 25. Or install a new version of Emacs using the Spacemacs recommendations https://github.com/syl20bnr/spacemacs/tree/develop#emacs#2020-07-2413:08jumarI ended up downloading new Emacs, switching to the latest develop branch, deleting my .spacemacs file and manually transfering relevant settings from my old .spacemacs file to the new one created by the spacemacs wizard.#2020-07-2413:32practicalli-johnnySPC f e D is also useful for comparing your .spacemacs file with the spacemacs.template, opens ediff and j and k step through changes. Or in this case using SPC D f f to select two files to use with ediff#2020-07-2414:03jumarThanks for the tip.
Btw as a side-effect it seems that the upgrade made my emacs way faster#2020-07-2414:28practicalli-johnnyI am trying out Emacs 28 at the moment, it seems a little faster too, although probably not as stable as 26.3. Emacs 27 should be out this year as the next stable release.#2020-07-2414:39maleghastI don't suppose anyone knows if I can update my exec-path through Spacemacs, or if there is any particular Spacemacs way of doing it..?#2020-07-2414:40maleghast(on my last machine it "just worked")#2020-07-2414:56practicalli-johnny@maleghast If you are using Spacemacs develop branch, SPC f e e will open your .spacemacs.env file which should be automatically populated from your Operating System when Emacs is started.
You can manually add entries to this file too.
If new entries for PATH or other environment variables are added after Emacs is running, then add them manually or restart Emacs#2020-07-2414:57maleghastThanks @jr0cket#2020-07-2414:57practicalli-johnnyPleasure. Hope all is fine with you#2020-07-2414:58practicalli-johnnyI am busy bee working on https://practicalli.github.io/ and getting out and about on my bike (although not as much as I should)#2020-07-2414:59maleghastGlad to hear you are well š#2020-07-2414:59maleghastIt's been a long time since I've seen anyone from the wider community in the flesh, I haven't seen my own team for a few months either....#2020-07-2414:59maleghastNot complaining, going full-remote has definitely had its perks#2020-07-2415:00maleghastš#2020-07-2414:57maleghastHow are you doing..?#2020-07-2414:59practicalli-johnnyI am going to start my own bank and make loads of money š
https://practicalli.github.io/clojure-webapps/projects/banking-on-clojure/#2020-07-2415:02maleghastThat sounds like a great idea#2020-07-2415:03maleghastYou've heard about Cognitect and NuBank I assume..?#2020-07-2415:19practicalli-johnnyYes, I want some of that action :rolling_on_the_floor_laughing:#2020-07-2415:20practicalli-johnnyIts all for my ever growing books on Clojure. Starting to get them into a much better shape and using lots of deps.edn and Clojure CLI tools.#2020-07-2415:25maleghastNice work!#2020-07-2415:43practicalli-johnnyI am thinking of getting a proper job and moving to Scotland at some point#2020-07-2417:32maleghastWould be lovely to see you...
Things have changed / moved on a lot at Cervest of late, so we are still on mission, but focusign a lot more on disclosure solutions and that kind fo thing for risk / climate risk to asset bases.#2020-07-2417:34maleghastCOVID-19 has made us 100% Remote Friendly, I am 100% Remote now, which does not preclude the idea of maybe quarterly visits to the office starting e/o Q1 next year, so I am quite pleased albeit I am missing having regular access to London theatres and my social life down there...#2020-07-2417:35maleghastScotland has a lot to recommend it though š#2020-07-2417:35maleghastWhere would you move to?#2020-07-2418:42practicalli-johnnyNot sure yet, somewhere pretty, which seems to be most of Scotland. Perth and Inverness look interesting, as I could go cycling over the Cairngorms#2020-07-2508:00EdmundUsing cider, is there a way to eval-all in spacemacs like you can do if you are just using Emacs and cider? the furthest I can see is eval-buffer but not all files.#2020-07-2508:58EdmundM-x and typing cider-eval-all.. shows the command. There aren't any key bindings for it off the bat though. Solves my problem for now.#2020-07-2509:14practicalli-johnnyEvaluating a buffer, , e b should evaluate all the required namespaces that buffer requires in its ms definition. So if you evaluate the main namespace, it should evaluate everything
I can add a key binding for existing commands if they are generally useful. Let me know if you find this command useful and suggestions for keybingings ( which should be under SPC m e menu)#2020-07-2515:36practicalli-johnnyInteresting, cider-eval-all-files is an alias for cider-load-all-files . The documentation for this command says it loads files below a directory, so I assume you need to be at the top level of the project to load all the files.
I would have thought cider-ns-reload-all would be a more general approach to (re) loading and hence evaluating all the files in the project (unless you have namespaces that are not used in the project yet and want to load them)#2020-08-0219:09Edmund@U05254DQM Sorry for a long overdue reply. Just wanna say thank you for the above. Wasn't aware evaluating current buffer also does its required namespaces. Very useful information also. Thanks for taking time to help and for such a wonderful tool š#2020-08-0408:40practicalli-johnnyA bug was found in the latest commit of the hl-todo package, which has now been reverted in the last hour https://github.com/tarsius/hl-todo/issues/56
If you get the error user-error: Cannot enable hl-todo-mode without font-lock then either do a package rollback, try another package update, or delete the hl-todo package from your .emacs.d/epla directory to force a new download.#2020-08-0506:49jumarM-C-k used to kill the next sexp; I recently upgrade my spacemacs and now it seems to place some cursors around (evil-mc-make-cursor-prev-line)
Is there an easy alternative for the former behavior?
How do I get rid of those cursors (without killing the buffer)?#2020-08-0507:20practicalli-johnny@jumar I seem to use SPC v x to delete an s-expressions in Evil normal state (when cursor is on the open or close paren)
SPC k d x is the smartparens delete the current s-expression and SPC k D x to delete the previous s-expression#2020-08-0507:25jumarAh nice, thanks!#2020-08-0517:15kirill.salykinhi
has anyone an instruction how to setup lsp with clojure?#2020-08-0517:36Dmytro Buninhttps://github.com/practicalli/spacemacs.d/blob/master/init.el
Looks like @U05254DQM experimented with it#2020-08-0517:38Dmytro Buninoh wait that looks like clj-kondo :thinking_face:#2020-08-0518:33practicalli-johnnyThere is a clojure-lsp package, but haven't tried it. Happy with the REPL, which is really fast with Clojure CLI tools.#2020-08-0614:58practicalli-johnny@kirill.salykin there does seem a lot of interesting work going on with https://github.com/snoe/clojure-lsp so if you try it then I am sure we will be interested to hear how you get on.#2020-08-0619:11lread@jr0cket, I think I have thanked you before for all your wonderful online guides, but it is time to thank you again! Thanks a bunch!#2020-08-0619:35practicalli-johnnyThank you. It's motivating to receive appreciation for the work I do.#2020-08-1107:20Karol WójcikHow to force apply of dir-locals?#2020-08-1109:38practicalli-johnnyEmacs 27.1 has been released. https://lists.gnu.org/archive/html/emacs-devel/2020-08/msg00237.html
I've used Emacs 27.0.50 for a while with Spacemacs and appart from some initial issues with the new dump systems (resolved last year) I haven't had any specific issues. So it should be safe to upgrade.
If you do upgrade, Spacemacs will download all the Emacs packages again (as it stores packages in version specific directory under .emacs.d/elpa )#2020-08-1118:04zaneAny new features folks are finding particularly useful? I havenāt taken a close look at the changelog yet.#2020-08-1118:15practicalli-johnnyNative JSON parsing seems to get a few mentions, along with the portable dumper.#2020-08-1118:39Karol Wójcik@U05254DQM how to install emacs with native json support?#2020-08-1118:39Karol WójcikIt seems that it's not auto enabled ://#2020-08-1207:04practicalli-johnnyI am afraid I couldn't find anything about enabling native json#2020-08-1207:16Karol Wójcik@U05254DQM I got it š:
https://freesteph.info/blog/compiling-emacs-27-1-on-fedora.html
Then check if support is enabled: https://www.reddit.com/r/emacs/comments/dewnxh/checking_whether_i_have_the_new_fast_json_support/#2020-08-1522:27Drew Verlee@U05254DQM how did you install it? it seems im on emacs version 26.3 because its the version ubuntu has in the app store#2020-08-1522:27Drew Verleei guess i can select 27.1 from the app store#2020-08-1523:36practicalli-johnnyI am actually using Emacs 28, via the emacs-snapshot package on https://launchpad.net/~ubuntu-elisp/+archive/ubuntu/ppa#2020-08-1523:39practicalli-johnnyIf using this PPA, remove all other emacs related packages first#2020-08-1201:27zaneSeems like iedit is maybe broken on develop? https://github.com/syl20bnr/evil-iedit-state/issues/27#2020-08-1206:03Karol WójcikYep. There is partial fix for it. Just add:
(defalias 'iedit-cleanup 'iedit-lib-cleanup)
#2020-08-1714:21practicalli-johnnyThere is a bug that prevents leaving iedit state sometimes. The following issue has a simple fix until a pr is accepted on the iedit project
https://github.com/syl20bnr/spacemacs/issues/13849#2020-08-1815:14mafcocincoJust curious: has anyone written or know of a layer for Datomic? Iām not sure all what would be involved but there are some tabbing/formatting considerations, specifically in the area of :where clauses on queries that would be useful.#2020-08-1815:33practicalli-johnnyI assume this would just need some formatting rules applied, rather than a layer. Or if more complex, then an Emacs package for Datomic.#2020-08-1815:33practicalli-johnnyThe only datomic specific package I have seen is https://github.com/magnars/datomic-snippets#2020-08-1816:17mafcocincoYes, i think it is mostly/exclusively formatting. Iāll check out the snippets package. Thanks for your help!#2020-08-1816:19practicalli-johnnyMaybe this will be helpful
https://docs.cider.mx/cider/0.26/indent_spec.html#2020-08-1816:20practicalli-johnnyWould be interesting to hear if you add any configuration. I will be doing Datomic work later in the year.#2020-08-1816:54zaneIād be curious to hear how your preferred formatting for queries departs from clojure-modeās default indentation!#2020-08-1818:11mafcocincoJust one specific place that I have seen, and maybe there is a work around. This is it:#2020-08-1818:14mafcocinco#2020-08-1914:35practicalli-johnnyI've updated The REPL section of Practicalli Spacemacs to clarify the difference between cider-restart (which doesnt restart the REPL) and sesman-restart which does restart the REPL https://practicalli.github.io/spacemacs/clojure-repl/#2020-08-1914:36practicalli-johnnyI still havent worked out if there is any value using cider-restart now that the REPL is only restarted by sesman-restart#2020-08-1914:51practicalli-johnnyIn https://practicalli.github.io/spacemacs/refactor/clojure-mode/ the clojure-mode refactor commands are now defined separately from the clj-refactor commands, making it easier to see if you need to add the optional clj-refactor package to the Clojure layer.#2020-08-2801:42nmkipHas anyone been able to run REBL using spacemacs?#2020-08-2805:49practicalli-johnny@juan.ignacio848 To get Cider to use REBL I use some middleware to run REBL with nrepl.
https://practicalli.github.io/clojure/clojure-tools/data-browsers/rebl-data-visualization.html#configure-rebl-with-cider-for-spacemacs--emacs#2020-08-2912:03nmkipI'll check reveal and portal#2020-08-2912:23practicalli-johnnyI think portal will be easier to run with CIDER, reveal works more like REBL, although you can use reveal as a tap> source#2020-08-2806:08practicalli-johnnyThere are several tools similar to REBL for data browsing or inspecting data. I still use cider-inspect the most though, as its built into CIDER.
https://practicalli.github.io/clojure/clojure-tools/data-browsers/#2020-08-2912:03nmkipAfter reading this, I tried cider-inspect. I liked it. A couple of questions:
⢠Do you have evil keys in that buffer? I can only move with hjkl
⢠I inspected (pressed enter) a keyword in a map and cider-inspect buffer showed me its content. Is there a way to return to the upper level of the map? #2020-08-2912:20practicalli-johnnyhttps://practicalli.github.io/spacemacs/evaluating-clojure/inspect.html should cover it, if not I'll try find more info.#2020-08-2912:22practicalli-johnnyL (captial l) takes you to a parent, if you are in a nested data structure#2020-08-2914:22nmkipThanks!#2020-08-2914:23nmkipI prefer staying in emacs. I'll test cider-inspect with some big ring request#2020-08-2914:26practicalli-johnnyI found cider-inspect very useful when working with a data science data set I used for Covid19 visualisations. Really nice for paging through data and nested expressions.
I don't really understand tap, datafy and REBL that much yet, but great to see them evolve.#2020-08-2914:28nmkipI haven't watched those videos yet#2020-08-3006:00jumarI use inspect all the time. I havenāt found rebl all that compelling #2020-08-2821:45murtaza52trying to do a new installation of spacemacs on a new OS, it is not able to find most of the packages such as helm etc. I have even tried starting it with the --insecure flag#2020-08-2821:50murtaza52after cloning spacemacs I have switched to the develop folder, I am using the cloned practicalli/spacemacs.d#2020-08-2906:44practicalli-johnnyThat's quite strange. You could move the .spacemacs.d and restart, just to check there isn't a bug in there (apologies if there is)#2020-08-2906:45practicalli-johnnyIf Emacs is less than version 26.3 then it could be the authentication issue with melpa.#2020-08-2906:46practicalli-johnnyIf it's MacOSX it could be running the old Emacs 22 that is included by default#2020-08-2906:48murtaza52Its manjaro linux, and emacs version is 27.2, i just tried a fresh install of soom emacs and it worked (I guess its cloning repos instead if installing packages from melpa but not sure)#2020-08-2906:56practicalli-johnnyCould be melpa having issues, it's rare but happens.#2020-08-2906:59practicalli-johnnyI was using Emacs 27 without any issues, although am using Emacs 28 snapshots on Ubuntu at the moment#2020-08-2912:25practicalli-johnnyAnother thought, it could be that some emacs packages have been installed via the manjaro package manager, this could cause some conflict (although I've not used manjaro for a long time)#2020-08-3011:17murtaza52maybe it was a melpa issue, started it again after a day and its working š#2020-08-3011:18practicalli-johnnyMelpa happens š#2020-08-3011:50murtaza52could you also list what binaries would be good to have installed for searching etc I underdstand these are optional ones, however they could really improve the dev experience#2020-08-3013:38practicalli-johnnyEasy, I already did that š
https://practicalli.github.io/spacemacs/before-you-start/recommended-command-line-tools.html
I've added this link to the practicalli/spacemacs.d README to make it more discoverable#2020-08-3013:38practicalli-johnnyLet me know if you think something is missing#2020-08-3009:27Umar Darazhi friends,
I don't know if it is a right channel to post this question or not.
Please forgive me if it is not.
I m unable to start cider-jack-in-clojurescript for my shadowcljs project in spaceemacs
but cider-jack-in works fine.
Please help me know what i m missing to make it work!
Here are the logs that I m getting.
Note: I m following practicalli spacemacs guide
Bundle of thanks
A session with the same parameters exists (clojure-projects/reviews:localhost:56442). You can connect a sibling instead. Proceed? (y or n) y
[nREPL] Starting server via /usr/local/bin/clojure -Sdeps '{:deps {nrepl {:mvn/version "0.8.0"} cider/piggieback {:mvn/version "0.5.1"} refactor-nrepl {:mvn/version "2.5.0"} cider/cider-nrepl {:mvn/version "0.25.3"}}}' -m nrepl.cmdline --middleware '["refactor-nrepl.middleware/wrap-refactor", "cider.nrepl/cider-middleware", "cider.piggieback/wrap-cljs-repl"]'
[nREPL] server started on 57396
[nREPL] Establishing direct connection to localhost:57396 ...
[nREPL] Direct connection to localhost:57396 established
error in process filter: user-error: The shadow-cljs ClojureScript REPL is not available. Please check for details
error in process filter: The shadow-cljs ClojureScript REPL is not available. Please check for details
#2020-08-3009:49practicalli-johnnyReview this guide to Clojurescript and cider for details on how to configure a shadow-cljs project
https://docs.cider.mx/cider/0.26/cljs/shadow-cljs.html#2020-08-3010:14Umar Darazthanks John
I will give it another go.
I worked me with emacs, but stop working when changed my configs to spaceemacs.
thank you so much for practicalli š#2020-08-3011:14practicalli-johnnyI don't believe there is any difference between using Emacs and Spacemacs, as the ClojureScript all goest through CIDER. It could be a change in CIDER version, or some settings you had in the Emacs config.
Looking at the #cider channel, many people have issues getting Shadow-cljs working, I think is just a matter of reading all the docs as there are more moving parts than with just a Clojure project.#2020-08-3017:27Umar DarazI was able to solve make it work be running my shadow server by running
npx shadow-cljs server
and then running cider-connect-cljs to it
thanks again for help @jr0cket#2020-08-3011:54murtaza52@jr0cket I noticed you have SPC / mapped to helm swoop, that is very useful !#2020-08-3011:56murtaza52just a nitpicking, I get these warnings when using the config -
Auto-evilification could not remap these functions in map 'org-agenda-mode-map':
- 'org-agenda-next-line' originally mapped on 'C-n'
Auto-evilification could not remap these functions in map 'org-agenda-mode-map':
- 'org-agenda-toggle-time-grid' originally mapped on 'G'
Auto-evilification could not remap these functions in map 'org-agenda-mode-map':
- 'org-agenda-filter-remove-all' originally mapped on '|ā
Auto-evilification could not remap these functions in map 'org-agenda-mode-map':
- 'org-agenda-filter-by-tag' originally mapped on '\'
Package cl is deprecated
#2020-08-3013:34practicalli-johnnyPackage cl is due to Emacs 27 dropping cl package as it was deprecated several years ago. There are a few community packages that still use cl instead of the new one, which I think is called cl-lib#2020-08-3013:36practicalli-johnnyThe others are warnings about remapping that have been around for ages. I've not experienced any issues so never looked into them.#2020-08-3012:02murtaza52is there a way to prevent same command showing up multiple times in the emacs command history ?#2020-08-3018:52practicalli-johnnyThere were some issues raise on the Spacemacs GitHub repository about duplicate commands in the helm popup.
I had the same issue. I think I deleted the helm packages and cleared the .emacs.d/cache . I believe it's the savehist file that contains the duplicates#2020-09-0208:03murtaza52@jr0cket which linting / formatting tool are you using in your spacemacs.d distribution ? (my colleagues may want to integrate it with their tooling)#2020-09-0208:18practicalli-johnnyI assume it's what ever clojure-mode is using https://github.com/clojure-emacs/clojure-mode
I'll take a look at the Spacemacs Clojure layer when I get to my computer#2020-09-0210:00practicalli-johnnyI cant see any obvious library that CIDER uses for formatting code, it seems to have its own functions for that. The Spacemacs Clojure does not add any formatting tools. If someone is using Calva or Cursive, then formatting should be the same.
clj-kondo is used for linting, its far the best tool for this, especially in terms of usability. I dont use others as it just adds complexity without any benefit to me.#2020-09-0210:03practicalli-johnnyIf you cant get formatting aligned between the different editors, you could try using https://github.com/weavejester/cljfmt as a command line task on the project before doing a commit of code. This would also mean you could use what ever formatting you wanted in the editors and then fix before commits.#2020-09-0313:25Ho0manHi everyone,
My search project SPC s P suddenly stopped working after system upgrade that updated emacs to version 27.1.
My current emacs version :
GNU Emacs 27.1 (build 1, x86_64-suse-linux-gnu, GTK+ Version 3.24.22, cairo version 1.16.0) of 2020-09-03
Here's the error : Symbol's value as variable is void: default-input
And I'm using practicalli's spacemacs.d
Thanks for the help in advance#2020-09-0314:58practicalli-johnnyUpdating Emacs to version 27.1 should not cause any problem, unless it can no longer find the external binary file that does the search, e.g. ripgrep, ag, grep.
I'm using Emacs 28 snapshot and SPC s P and SPC / work without issue.
SPC b m to check if there are errors in the message buffer#2020-09-0315:01practicalli-johnnyIt could be an issue with helm packages, there have been some changes recently. I assume that would show an error in the mini-buffer and/or message buffer.#2020-09-0320:47Drew Verlee@U05254DQM is there a reason to prefer 27.1 over 28 or vice versa?#2020-09-0322:17practicalli-johnny@U0DJ4T5U1 Version 27.1 is now the stable release of Emacs and version 28 is still a moving target.
Emacs 28 will include native compilation of lisp, so could run a lot faster (it seems a little faster). I have had a few crashes though, so no guarantee its stable.
Until the next release of Ubuntu though, its actually easier to install Emacs 28, which is available from the Ubuntu Emacs PPA https://launchpad.net/~ubuntu-elisp/+archive/ubuntu/ppa
I'll switch to 27.1 when I upgrade to 20.10 which should have that version packaged as the default.#2020-09-0402:26Drew VerleeThanks for the help!#2020-09-0405:43Ho0man@U05254DQM Thanks a lot
I forgot to include the error message, sorry.
It gave me this :
Symbol's value as variable is void: default-input#2020-09-0405:48Ho0manYou were right though that the issue was caused by recent updates to the helm package.
There was another bugfix update for helm-ag today that fixed the issue.
Thanks a lot @U05254DQM for always helping out here#2020-09-0612:46AndrosFor all: Do you use the develop or stable branch? I think develop is not very stable to work with, but master is quite outdated.#2020-09-0613:22Drew VerleeI use develop, just be ready to roll back if something you need stops working#2020-09-0614:03practicalli-johnnyOr dont update the Emacs packages unless there is a specific reason too and do so when you have a few minutes to roll the packages back.#2020-09-0614:00practicalli-johnny@andros I don't know anyone who uses the master branch of Spacemacs. New people to Spacemacs looking for help are recommended to update to Spacemacs develop and this usually fixes their issue.
I have used Spacemacs develop for the last 4 years with only one minor issue with Spacemacs itself, which was fixed very quickly.
Issues mostly come from new versions of Emacs packages which Spacemacs layers use. So issues are almost always around a change to a package. Spacemacs does not automatically update Emacs packages and also provides a fast roll back mechanism for packages. So unless there is a new feature you require, you can run Spacemacs develop in a stable state without any package upgrades and experience a very stable system.#2020-09-0614:02practicalli-johnnyIf anyone does switch from Spacemacs master to Spacemacs develop then either wipe all Spacemacs configuration or make sure a full switch over is done, including updating the .spacemacs file from the template (or issues will occur)
https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html#2020-09-0623:03Drew VerleeGiven the goal of using this package (see below) that lets your lookup definations of clojure functions in the livebook "Clojure essential reference" (which i have access to) I added
(use-package clojure-essential-ref
;; ...
:bind (
:map cider-mode-map
("C-h F" . clojure-essential-ref)
:map cider-repl-mode-map
("C-h F" . clojure-essential-ref)))
To my spacemacs to dotspacemacs-additional-packages and expected to be able to type M - x clojure-essential and see that command OR type C-h F and have the "clojure-essentia-ref" command run. Neither command is available. e.g M-x has no listing for "clojure-essential" Not sure what would gone wrong.
https://github.com/p3r7/clojure-essential-ref
If anyone got this working a hint would be nice. I don't plan on putting much energy into getting this to work at the moment. But eventually it would be a worth while integration.#2020-09-0711:34practicalli-johnnyI tried to get this package to work a while ago and had another try just now. I've never managed to get it to work.#2020-09-0718:23Drew VerleeSomehow in updating a lot of the cider bindings changed. ugh. e.g now eval to comment is something completely different. I'll have to go find the out mappings and make them explict as i can't see why its useful to me to switch them.#2020-09-0718:44practicalli-johnny, e ; has been cider-eval-defun-to-comment since May 4th 2017.
What has it changed to? I havent seen any relevent commits or pr's on spacemacs#2020-09-0718:47practicalli-johnnyI added key bindings for the Clojure Pretty Print to comment commands in March this year, putting all the pretty print keybindings under , e p#2020-09-0718:49practicalli-johnnyThe changes for the Clojure layer is pretty quiet https://github.com/syl20bnr/spacemacs/pulls?q=is%3Apr+is%3Aclosed+clojure#2020-09-0718:56Drew Verlee", e ;" is now undefined in my current setup.
cider-eva-defun-to-comment is C-c M-; for me. I'll look into why this happened š#2020-09-0719:01practicalli-johnnyDid you check you are still running develop branch of Spacemacs š. Spacemacs master has lots of missing key bindings (I added a lot to develop over the last 2 years)#2020-09-0719:01practicalli-johnnyOr is evil turned off...#2020-09-0719:03Drew Verlee@U05254DQM I was on master branch. Nice catch!#2020-09-0908:57EdmundHi all. I'm getting an error: error: could not start nREPL server. COMSPEC not set.#2020-09-0908:57EdmundAny idea what could cause this?#2020-09-0909:05practicalli-johnny@edmund691 From a quick search, this looks like an issue specific to Windows operating system. Seems windows can't find your CMD.exe binary. Try searching for this error in a search engine and try some of the suggestions. You could also try #clj-on-windows channel, but this seems specific to your windows config.#2020-09-0909:06practicalli-johnnyAlso try running a command window to se if that works#2020-09-0909:09Edmund@jr0cket thanks for your response. Commands are working. I can start the repl from the windows command using lein. Its been working but for some reason I just started getting this error. Tried re-installing both emacs and spacemacs to no avail. Not getting much useful hints on google. The error isn't giving me much to work with.#2020-09-0909:43practicalli-johnnyIs cider-connect-clj working from Spacemacs?
The only thing I can think of is something missing from the path information that Emacs picks up and is unable to call out to the command line (the error seems specific to the cmd.exe location).
If you are using Spacemacs develop branch, then SPC f e e will open the spacemacs.env file that is automatically populated with environment variables from the operating system. Environment variables can be added to the spacemacs.env file.
If you are using Spacemacs master branch, then use SPC SPC getenv to see the environment variables set. Fix the environment variables in the operating system and then restart the operating system.
I dont use windows, so cant help you with the specifics of the environment variable needed (I am sure an internet search will tell you).
If using Spacemacs master you can also try switching to develop (although if its a path issue in the operating system then that probably wont fix it, but develop is the recommeded version of Spacemacs to use)
https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html#2020-09-0910:45Edmund@jr0cket thanks for pointing me in the right direction. Needed the COMSPEC env set to the windows cmd path. No idea how it was working all along without it. Thanks a million.#2020-09-1615:39zaneDoes SPC p p no longer create a new layout?#2020-09-1615:58practicalli-johnny@zane I've always used SPC l l to create new layouts.
SPC p p is currently set to switching projects. I havent used that much, so dont know if it ever let you create a new project, but it seems strange if it did as projects arent exactly layouts#2020-09-1615:59zaneInteresting.#2020-09-1616:00zaneSPC p l appears to do what I want: Prompt for a project, create a new layout for that project, and switch to it.#2020-09-1616:01zanehttps://develop.spacemacs.org/doc/DOCUMENTATION.html#project-layouts#2020-09-1616:01practicalli-johnnyAh, that seems to make more sense. Maybe the keybinding was changed at some point.
There is a lot of cross-over between projects, layouts and workspaces#2020-09-1719:31rbergerHow do I customize my init.el so that it auto-indents the whole file only for clojure/clojurescript files?
I tried:
(defun my--clojure-mode-hook ()
(make-local-variable 'before-save-hook)
(add-hook 'before-save-hook
'(lambda ()
(clojure-indent-region (point-min) (point-max)))))
(add-hook 'clojure-mode-hook 'my--clojure-mode-hook)
But it seems to indent files of all types#2020-09-2223:17zaneInstead of trying to make before-save-hook local you could have your hook always run, but only indent if the current major mode is one of the Clojure major mode (`.clj`, .cljs, or .cljc).#2020-09-2223:19rbergerAny suggestions on how to do that? Iām not an elisper so much#2020-09-2318:40zanehttps://emacsredux.com/blog/2020/06/14/checking-the-major-mode-in-emacs-lisp/#2020-09-2318:41zaneSo, perhaps something like this:
(add-hook 'before-save-hook
'(lambda ()
(when (derived-mode-p 'clojure-mode)
(clojure-indent-region (point-min) (point-max)))#2020-09-2318:42zaneAlternatively you could turn on aggressive-indent-mode for Clojure files only.#2020-10-0522:29rbergerThanks! Giving that a try. Seems to be working.#2020-10-0618:17zaneGlad to hear it!#2020-09-1720:34njjHey all, I used to have this great re-mapping for slurp and barf that an old co-worker gave me but I can't for the life of me figure out how to get it back. I could do "slurp forwards" (`sp-forward-slurp-sexp` ) with shift + > and and "slurp backwards" with shift + <#2020-09-1720:34njjany advice on how to achieve this again?#2020-09-1720:56practicalli-johnny@njustice I assume you don't want to use the built-in key bindings, SPC k s and SPC k S for those slurp commands. I prefer these over the more awkward custom key bindings I used to use.
Edit the .spacemacs file and add one of the following to the dotspaceamcs/user-config section
The global approach would be
(define-key global-map (kbd "S->") 'sp-forward-slurp-sexp)
For just Clojure mode, then
(define-key clojure-mode-map (kbd "S->") 'sp-forward-slurp-sexp)
These will over-ride any existing key bindings#2020-09-1721:00njjSweet let me give that a go#2020-09-2406:54jumarWhat's the best way to change keybinding for C-M-k? Specifically for clojure/lisp buffers.
It used to work as kill-sexp but it doesn't work that way anymore in a clojure buffer (it still works properly in the REPL buffer);
instead it's bound to evil-mc-make-cursor-move-prev-line which is very confusing for me and next to useless.
I tried
(global-set-key (kbd "C-M-k") 'kill-sexp)
=> has no effect (overridden?)
(define-key evil-mode (kbd "C-M-k") 'kill-sexp)
doesn't work because it needs a keymap (I don't know which one)#2020-09-2410:23practicalli-johnny@jumar If you are using evil editing style, then try (evil-global-set-key 'normal "C-M-k" 'kill-sexp) to over-ride the evil keybinding for Evil normal state. Replace normal with insert if you want that keybinding to work when in Evil insert state.
Or you can use SPC k d x to call sp-kill-sexp , SPC k d w to kill word and SPC k d s to kill a symbol.
Or you can use Emacs or hybrid editing style if you do not make use of evil style editing.#2020-09-2418:54jumarThanks for the tip - the evil-global-set-key fails though:
(evil-global-set-key 'normal "C-M-k" 'kill-sexp)
*** Eval error *** Key sequence C - M - k starts with non-prefix key C
#2020-09-2418:55jumar(with 'insert mode it seems to work)#2020-09-2512:05jumarYeah, I mean, it works with the insert mode but what I'd like to make it work in normal mode too - for that I cannot do it it seems.#2020-09-2423:21zaneWow, is it just me or does , e p e (`cider-pprint-eval-last-sexp`) print records as if they were maps?#2020-09-2423:43practicalli-johnny@zane the , e p menu has keybindings that pretty print the evaluated results, added back in March https://github.com/syl20bnr/spacemacs/pull/13421
I think of Records in Clojure as custom typed maps, so not surprised they print as maps. Would be interested in seeing examples if you can share.
Thanks.#2020-09-2423:50zaneclojure.pprint/pprint also prints records as maps, so I suppose the behavior is at least consistent. That was a huge surprise to me, though.#2020-09-2423:51zane(defrecord Test [x y])
(->Test 0 1)
pretty-prints as
{:x 0, :y 1}#2020-09-2423:52zaneI would have expected
#user.Test{:x 0, :y 1}#2020-09-2814:39practicalli-johnnyThe command cider-eval-list-around-point has been added to the recently released Cider 0.26 version, so I created a pull request on Spacemacs repository to add a key binding to the Clojure major mode menu. I've chosen SPCE m e ( as the keybinding as l was already taken in the evaluation menu.
Feedback and reactions are welcome on the pull request page
https://github.com/syl20bnr/spacemacs/pull/13991#2020-09-2817:21mathpunkI'm having this problem, which I think is a path problem, and none of the methods I can find via googling are helping. I switched from a Linux box to a MacOS machine. I cannot for the life of me figure out how to explain to my typescript layer how to find the node executable [SOLVED]#2020-09-2817:22mathpunkSomeone had a similar problem with their haskell compiler, and they added a path line to /etc/paths; this did not help#2020-09-2817:23mathpunkOther people have described using executable-find and process-lines to understand how things are set in their emacs, but those commands don't appear when I do SPC SPC#2020-09-2817:23mathpunkI created a zshrc file that inclues the executable path, so now when I open the emacs shell (I don't usually use it) and say which node#2020-09-2817:23mathpunkthe program is found#2020-09-2817:23mathpunkbut the tide-server still cannot find it#2020-09-2817:24mathpunkthat MIGHT imply it's a problem with the layer? my next step is checking the issues page there#2020-09-2817:32mathpunkwell I added some variables here and made sure that I'd npm installed everything mentioned https://develop.spacemacs.org/layers/+lang/typescript/README.html#2020-09-2817:32mathpunkbut still node is not found#2020-09-2817:33mathpunki didn't have trouble on my linux box so I'm having trouble figuring out what could be wrong š¢#2020-09-2817:40mathpunkGOT IT#2020-09-2817:40mathpunkhttps://emacs.stackexchange.com/questions/34201/emacs-cant-find-node-when-node-was-installed-using-nvm#2020-09-2817:40mathpunkto my shock and alarm, SPC SPC#2020-09-2817:40mathpunkdoesn't find executable-path#2020-09-2817:41mathpunkbut M-: still lets me execute that#2020-09-2817:41mathpunk:man-shrugging::skin-tone-2:#2020-09-2818:13practicalli-johnnyTo help troubleshoot paths and environment variables with Spacemacs:
SPC f e e opens the spacemacs.env file which automatically generated when running Emacs, populated from the operating system path. So you can always check that file to see if the right path is being picked up.
Its possible to add environment variables here, for example adding things to the path.
Ideally the path would be fixed in the OS layer, if not then adding to the spacemacs.env file might help#2020-09-2821:14mathpunkthat's a great tip, thanks!#2020-10-0106:19jumarI'm suffering from a poor responsiveness when I trigger a key combination that's not finished.
E.g. when I press , r it takes a few seconds until the popup help menu is shown.
It takes even longer when I press SPC o c which is my custom prefix for some of the cider functions.
In general if I don't manage to type something out (either because I don't know or because I'm too slow) the emacs freezes for several seconds.
This has been magnified by my own setting dotspacemacs-which-key-delay 0.2 which I removed but it's still a very visible problem.
Any ideas on how to debug this or what could be the problem?#2020-10-0108:23practicalli-johnnyThere is a discussion about this issue here. One simplistic approach is to delete unused layers and then which-key has less to do
https://github.com/justbur/emacs-which-key/issues/226#2020-10-0108:29jumarThanks for the link - I'll check that for more details.#2020-10-0108:53jumarThere I found this too: https://github.com/syl20bnr/spacemacs/issues/13872
The suggestion to increase delays to effectively disable "which menu" wasn't satisfactory (although it solves the performance issue)
so I tried to delete the elpa directory and let emacs reinstall the packages - so far it looks much better#2020-10-0317:57dev.4openIDnoob question (Warning!!! š)
When opening spacemacs -> splash screen. How does one remove (eliminate) the "Important Messages" section (they are all .200 and not relevant)? I have seen this removed elswhere and would like to have similar config.
I have looking through a rats nest of answers and none seem to apply#2020-10-0318:02practicalli-johnnyDo you mean messages on the home buffer? (the default buffer that opens, with the Spacemacs logo)#2020-10-0318:03dev.4openIDyes#2020-10-0318:03practicalli-johnnyIf there are errors, they may show there and should be resolved ideally. That is the best way to remove them.#2020-10-0318:04dev.4openIDIt is not error but
āā Important Notes (Release 0.200.13.x) āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā®
ā ā
ā MELPA HOT FIX RELEASE ā
ā ā
ā - Fixes removed packages from MELPA. ā
ā ā
ā Essentially Emacs WIKI packages are concerned. They have been imported as ā
ā local packages from Emacsmirror GitHub organization (thanks to tarsius for ā
ā maintaining it) ā
ā ā
ā°ā Update your dotfile (SPC f e D) and packages after every update āāāāāāāāāāāāāÆ#2020-10-0318:05dev.4openIDnot relevant to the version and I want to suppress these#2020-10-0318:06practicalli-johnnyThat looks like release notes, press RET on the Release Notes link on the home page, or use the mouse#2020-10-0318:06practicalli-johnnyThe release notes suggest you are running Spacemacs 0.200 and not Spacemacs 0.300 (which has lots of new features and updates)#2020-10-0318:07practicalli-johnnyI recommend using Spacemacs develop, especially if you are having issues or find features that are missing
https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html#2020-10-0318:07dev.4openIDMe bad it is .200 - I am using the develop branch and leverage git pul --rebase instead to ensure latest copy#2020-10-0318:08practicalli-johnnyš#2020-10-0318:08practicalli-johnnyA quick check is to look in the top right corner of the home buffer, it has the spacemacs version followed by the emacs version#2020-10-0318:09practicalli-johnnyWhen changing from 0.200 to 0.300, make sure you check your .spacemacs is up to date using SPC f e D#2020-10-0318:15dev.4openIDOops missed step on fresh install š#2020-10-0318:16practicalli-johnnyWe've all been there š#2020-10-0318:26dev.4openIDOK so back to the question - now for all 0.300 Important Notes#2020-10-0318:53practicalli-johnnyUse the release notes link on the home page to toggle display of the release notes. Once they are off, they should stay off#2020-10-0418:10dev.4openIDThx @U05254DQM#2020-10-0716:48practicalli-johnnyChanges to the practicalli/spacemacs.d configuration for Spacemacs.
Now recommending Emacs 27.1 as its the current stable version and it supports ligatures (stylized character pairs).
⢠renamed Git branch to live (update your remote urls)
⢠added unicode ligature support
⢠Switched to using Fira code font as this has ligature support
⢠Updated the doom modeline theme for a nice minimal look without loosing any important information
⢠Added font rendering optimizations
⢠custom snippets: deprecated and design journal banners, rich code block with clj-kondo ignore duplicate vars #2020-10-0717:26spfeifferWhat means āsupports ligaturesā? I have Fira Code with Ligatures for quite some time. Things got easier?#2020-10-0717:35practicalli-johnnyEmacs 27 now uses the HarfBuzz as its shaping engine by default, which provides extensive ligature and other fancy text rendering....
I don't know what it was like before, but I just changed the font and added the unicode-font layer with a variable to enable ligature support.#2020-10-0717:39practicalli-johnny;; Support font ligatures (fancy symbols) in all modes
;; 'prog-mode for only programming languages
;; including text-mode may cause issues with org-mode and magit
(unicode-fonts :variables
unicode-fonts-enable-ligatures t
unicode-fonts-ligature-modes '(prog-mode))
That's it#2020-10-0717:53lreadOh thatās cool, I can now get rid of that special setup under user-config!#2020-10-0717:59spfeifferYes, did not know that. I also had the special setup to get Ligatures going#2020-10-0813:23Karol WójcikIs it possibile to target both clojure-mode & clojurescript mode in one entry of .dir-locals?#2020-10-0813:46practicalli-johnnyIn one .dir-locals.el file, not sure what you mean by one entry...#2020-10-0813:47practicalli-johnnyThis might help... https://practicalli.github.io/spacemacs/clojure-projects/project-configuration.html#2020-10-0813:47practicalli-johnnyThere are lots of variables that can be included https://practicalli.github.io/spacemacs/reference/cider/configuration-variables.html#2020-10-0813:48practicalli-johnnyI am not sure what all of them do yet, but #cider people should be able to help#2020-10-0814:55Karol Wójcik@jr0cket I would like to propagate variables set in clojure-mode to clojurescript-mode#2020-10-0815:14Karol WójcikActually I think that specifying options for clojure-mode propagates to clojurescript as well š#2020-10-0815:10Kurt SysI'm running some clj code blocks from org mode, but the output doesn't contain any newlines:
#+begin_src clojure
4544 ;; number
\a ;; character
"a" ;; string
#+end_src
#+RESULTS:
: 4544\a"a"
Is there a way to add newlines after eacht line of output? What I'd like to see in the results is:
#+begin_src clojure
4544 ;; number
\a ;; character
"a" ;; string
#+end_src
#+RESULTS:
: 4544
: \a
: "a"
How to do that?
I've tried different :output values.#2020-10-0815:34practicalli-johnny@kurt.sys my first thought would be to wrap them in println but I suspect that's not quite what you want to achieve.#2020-10-0815:43Kurt Sys@jr0cket yeah... that's not really what I want to achieve. I'll manage without, but it would be nicer with the newlines. Thanks anyway!#2020-10-0910:02kirill.salykinhi#2020-10-0910:02kirill.salykinanyone uses ivy and ivy-postframe?#2020-10-0910:12practicalli-johnnypostframe doesn't seem to be included in the Ivy layer, maybe it works by adding as an additional package, but not sure if there is anothe package doing the same thing.
I'm still using helm, might give Ivy a try at the end of the year.#2020-10-0910:14kirill.salykinyes, postframe is not included and additional package required
it seems to work fine, except postframe seems ignoring <M-o> from ivy layer (action selection)
was hoping someone has a solution#2020-10-0910:14kirill.salykinhelm is archived š#2020-10-0910:17practicalli-johnnyHelm still works fine for me, so it's not that relevant at the moment that the maintainer has stopped working on it.
Doom uses Ivy by default, so you may find some config there that can be used with Spacemacs.#2020-10-0910:18kirill.salykinwill look there, thanks!
> Doom uses Ivy by default
While reading this thought you recommending to switch š#2020-10-0910:19practicalli-johnnyI have tried Doom out just recently, it's not as useful to me as Spacemacs.#2020-10-0921:22zaneI tried Doom and found that in order to recover the features I used in Spacemacs I had to reimplement a lot of it. It wasnāt worth it.#2020-10-0921:22zaneIt is fast.#2020-10-0921:29zaneBut some of that speed comes from simply having fewer features.#2020-10-0915:35Gleb Posobinaggressive-indent seems to be slowing down typing on emacs on moderately large files (about 400 lines), how do I auto indent only when switching back into normal mode when using evil?#2020-10-0916:04practicalli-johnny@posobin Clojure mode should intent new lines as you type. TAB should also indent a line if it has become misaligned#2020-10-0916:08Gleb PosobinTab in normal mode?#2020-10-1007:40Karol WójcikHow do you ignore directories using projectile so that SPC p f does not shows the resources directory? I don't want to put this directory in .gitignore for obvious reasons. Tried switching to 'native indexing method, adding .projectile file, specifying ignored directories via projectile-globally-ignored-directories seems to not work either.
š#2020-10-1007:44practicalli-johnny@karol.wojcik a .projectile file that contains ignore patters is what I would used.
Reopen any open files from the project for the .projectile file to be loaded (or restart Emacs).#2020-10-1007:45Karol Wójcik@U05254DQM do you use ivy?#2020-10-1007:46practicalli-johnnyNo, I use Helm.#2020-10-1007:49Karol WójcikMaybe that's the issue.#2020-10-1007:49Karol WójcikI'm using Ivy#2020-10-1007:50practicalli-johnnyI also have repgrip installed.
From a quick search there is mention of invalidating the cache (not sure how)
Also mention of using a .ignore file with patterns to exclude#2020-10-1007:53Karol Wójcik@U05254DQM Actually there is no difference. Tried helm with the following .projectile content:
-resources
Regarding repgrip I got it installed as well and using .ignore file works perfect when using SPC / .
I think that it's some kind of projectile issue which is not respecting the .projectile file in alien mode.#2020-10-1007:53Karol WójcikTo be frank I had it working for few searches when using native mode then it switched back to indexing "resources". š#2020-10-1007:54Karol Wójcik@U05254DQM When it comes to invalidating the cache you can do it by using SPC p I#2020-10-1007:56practicalli-johnnyIf invalidating the cache doesn't work then I am out of ideas, sorry.
Probably should raise a bug on Spacemacs#2020-10-1007:57Karol WójcikWill do. Thank you very much though!#2020-10-1007:57practicalli-johnnyI'll see if I can replicate the issue later when I get to the computer.#2020-10-1008:07Karol WójcikSure thing!#2020-10-1008:27Karol WójcikGot a workaround:
(progn
(make-local-variable 'projectile-globally-ignored-directories)
(add-to-list 'projectile-globally-ignored-directories "resources")
(set 'projectile-globally-ignored-directories projectile-globally-ignored-directories)
(defun f/invalidate-resources-cache ()
(interactive)
(projectile-purge-dir-from-cache "resources"))
(f/invalidate-resources-cache))
#2020-10-1008:28Karol WójcikAs long as you don't invalidate cache of the project it will work š#2020-10-1100:15zaneJust discovered that avy has some additional capabilities hidden under a context menu that can be accessed with ? after selecting a target. Super useful.#2020-10-1100:19zanehttps://github.com/abo-abo/avy/blob/36f768d9e320d300b81799e0fcc097cb89aad780/avy.el#L170...L178#2020-10-1111:10practicalli-johnnyInteresting. I used teleport and it moved the selected target to the location of the cursor (point), that was fun š
I've created an issue to add this to the book, thanks
https://github.com/practicalli/spacemacs-content/issues/277#2020-10-1206:04zaneYeah, teleport was my favorite.#2020-10-1206:04zaneI added āchangeā in my personal config:
(use-package avy
:after evil
:config
(defun avy-action-change (pt)
"Kill sexp starting on PT and enter insert-mode."
(avy-action-kill-move pt)
(evil-insert 1))
(setq avy-dispatch-alist
'((?c . avy-action-change)
(?x . avy-action-kill-move)
(?X . avy-action-kill-stay)
(?t . avy-action-teleport)
(?m . avy-action-mark)
(?n . avy-action-copy)
(?y . avy-action-yank)
(?i . avy-action-ispell))))#2020-10-1206:04zaneGlad you found it useful!#2020-10-1407:05flefikLatest commit on develop crashes on init since evil-set-undo-tree is an undefined symbol in packages.el. Everyone or just me?#2020-10-2000:19practicalli-johnnyUpdates to the Practicalli Spacemacs book:
* [Running specific test groups with test selectors](https://practicalli.github.io/spacemacs/testing/unit-testing/running-tests.html#using-test-selectors-to-run-specific-tests)
* [Line numbers - visual, relative and absolute styles](https://practicalli.github.io/spacemacs/install-spacemacs/line-numbers.html)
* [Repeating searches and scrolling through search pattern history](https://practicalli.github.io/spacemacs/spacemacs-basics/working-with-projects/searching-projects.html)#2020-10-2000:36practicalli-johnnyEmacs survey 2020 https://form.jotform.com/202884894078067
It only takes a few minutes to complete the survey and will help the Emacs development teams continue to improve Emacs#2020-10-2107:56jumarWhenever I try to "search project" (fulltext search via SPC /) it ignores the "hidden" files - that is file names beginning with .
So e.g. I have github actions workflows in the <root>/.github/workflows directory and I can't find any thing inside those files.
Is there a way to make it work?#2020-10-2108:02practicalli-johnny@jumar if you are using rg (might also work for au) as the search binary, then arguments can be added at the end. To search in hidden files for a searchpattern:
searchpattern -- --hidden
#2020-10-2108:04practicalli-johnnySeems there are also these arguments...
-u = don't respect .gitignore or .ignore files
-uu = same as -u and show hidden files
-uuu = same as -uu and search binary files
The argument approach might only work if using helm#2020-10-2108:18jumar@jr0cket that's very helpful, thanks!
Using -uu seems to be perfect although it would be even better if that was the default (can I change that?)#2020-10-2108:39practicalli-johnnyripgrep default arguments can be set using a ripgrep configuration file
https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#configuration-file#2020-10-2108:43practicalli-johnnyIf using helm, then you could also set helm-ag-base-command to include any default options, either in .spacemacs or using the Emacs customize command to set it#2020-10-2108:45practicalli-johnny(custom-set-variables
'(helm-ag-base-command "rg --no-heading")
`(helm-ag-success-exit-status '(0 2)))
#2020-10-2108:45practicalli-johnnyhttps://github.com/emacsorphanage/helm-ag#ripgrep
I assume you realise that setting rg to search through hidden files (regardless of method) may slow down searches in certain directories. You may want to exclude .git directories in any config.#2020-10-2117:23mathpunkI'd like to remap my evil lisp state leader. The docs suggest
(evil-lisp-state-leader ", l")
but that causes
(Spacemacs) Error in dotspacemacs/user-config: Symbol's function definition is void: evil-lisp-state-leader
I'm thinking maybe I need to wrap that function in something that waits for something else to load first?#2020-10-2119:47practicalli-johnnyYou can set all the leader keys in .spacemacs, no need for your own custom configuration#2020-10-2120:09practicalli-johnny;; Major mode leader key is a shortcut key which is the equivalent of
;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
dotspacemacs-major-mode-leader-key ","
#2020-10-2203:25mathpunkMy major-mode leader is fine. It's the leader to enter lisp-state that I'm trying to change#2020-10-2207:31practicalli-johnnyMy bad, didnt read properly...
Its usually add-hook or with-eval-after-load
I cant actually find evil-lisp-state-leader as a variable though...#2020-10-2207:42practicalli-johnnyIn the /emacs.d/layers/+spacemacs/spacemacs-evil/packages.el the the lisp spate leader key is set with
(spacemacs/set-leader-keys "k" evil-lisp-state-map)
So I am guessing its something like
(with-eval-after-load 'evil-lisp-state
(spacemacs/set-leader-keys "k" evil-lisp-state-map))#2020-10-2216:36practicalli-johnnyUsing Clojure CLI tools aliases with Cider jack-in has an issue when using -M flag for including aliases, specifically when they are defined in a .dir-locals.el . When cider composes the command line arguments, they are not placed in the correct order (aliases are placed before clj-opts).
The -A flag does not have a problem (although that flag is deprecated).
https://github.com/clojure-emacs/cider/issues/2916#2020-10-2311:15practicalli-johnnyI've submitted a pull request to fix the parameter ordering in Cider jack-in for Clojure CLI deps.edn projects. If you are using Clojure CLI tools deps.edn projects, take it for a test drive if you can.
https://github.com/clojure-emacs/cider/pull/2917#2020-10-2613:10MichaÅHi!
I'm trying to switch from IntelliJ to spacemacs + clojure layer and got a question about cider-jack-in-clojure and cider-jack-in-clojurescript. Currently my project structure is
src/
src/clj
src/cljs
src/cljc
when I start first connection using cider-...-clojure to file in clj directory it works fine, however second connection as clojurescript give me the note about reusing sibling connection A session with the same parameters exists (...). You can connect a sibling instead. Proceed? (y or n) And then I'm getting the error: user-error: No cljs REPLs in current session
To be able to use this clojurescript REPL correctly I need to manually assign cljs and clj dirs using sesman-link-with-directory .
I hope I made the problem clear š Now the question - Is there any easy solution so I don't have to do this manually each time? Maybe some way to setup this globally, so each time clj and cljs directories are linked correctly?#2020-10-2619:51practicalli-johnnyHave you tried cider-jack-in-clj&cljs ?
Or running the ClojureScript Repl from the Clojure Repl prompt?
Do you have an example of the project you can share? Or are you using a template to create the project?
Not sure how to reproduce this issue otherwise#2020-10-2620:20MichaÅI'd need to create some minimal project for you to reproduce the issue. I'll also later try the clj&cljs, but I have the feeling that tried it and it didn't work.
After talking with @UB0EMUD34 who experienced the same issue - he has found a solution and created PR today - https://github.com/clojure-emacs/cider/pull/2923 Comments are welcome.#2020-10-2615:16Michael Stokleyis there a way to eval an expression and yank it?#2020-10-2619:56practicalli-johnnyI am not aware of a single command to do that, curious as to the use case.
You could write and elisp function to do both with one key binding.#2020-10-2620:27Michael Stokleyyeah, maybe a custom function is the right approach here.
during local development i often find myself evaluating expressions and then yanking the contents for use elsewhere. for example, today i needed to know the value of (inst-ms (.plus (Instant/now) (Duration/ofDays 3))) to test an endpoint that takes date range parameters#2020-10-2620:38refsetI am also interested to see what a good answer is. I usually do evil-cp-evil-copy-paste-form (M-w) then cider-eval-last-sexp-and-replace (SPC m e w)#2020-10-2705:36jumarIs there a good way to quickly list (and jump to) public symbols (mostly functions) in the current ns?
I frequently use SPC j i but that lists all the functions/symbols, including private ones.
There's cider-browse-ns which only shows public symbols but it's harder to use - I need to type in the name of the namespace.#2020-10-2706:01jumarFor now, I've defined custom shortcut in Keyboard Maestro to do SPC s s defn \ #2020-10-2711:34practicalli-johnnyIt would be interesting to have a helm/ivy style completion popup that lists all the functions in the project (or narrowed to a project) and selecting the function jumps to its definition.
This would be useful for discovering functions as well as quick navigation.
Maybe there is something in the LSP style tools for this.#2020-11-0310:16murtaza52Hi, I want to add an eshell alias ex alias ll="ls -l" where should I do that ?#2020-11-0310:17murtaza52also my project is using direenv and would like to initialize that when in eshell. this is what I have to add in bash eval "$(direnv hook bash)" any leads on how I can accomplish the same for eshell ?#2020-11-0310:19murtaza52(https://direnv.net/)#2020-11-0312:08otwieraczI donāt think itās possible. eshell is simply not supported.#2020-11-0312:09murtaza52hmm and how about the alias ?#2020-11-0312:09otwieracz(defalias 'll "ls -la")#2020-11-0312:09otwieracziirc#2020-11-0312:10otwieraczof, no.#2020-11-0312:10murtaza52or just running a command - ssh-add /home/myuser/.ssh/id_rsa#2020-11-0312:10otwieraczhttps://www.emacswiki.org/emacs/EshellAlias#2020-11-0312:13otwieraczSo I am not sure if and how ssh-agent is able to work within eshell environment.#2020-11-0312:13otwieraczBut from what I see, itās working just fine.#2020-11-0312:14otwieraczBut you shouldnāt expect that sh-specific utilities will work in eshell.#2020-11-0313:58murtaza52can you elaborate more on this ? why could this be a problem ?#2020-11-0314:01murtaza52I am using a leiningen plugin which uses ssh, and thus my ssh key needs to be added to the agent.#2020-11-0314:55otwieraczSo basically things like direnv expect sh-compliant shell.#2020-11-0314:55otwieraczThere might be some problems trying to use them in eshell.#2020-11-0314:57otwieraczDepending on the actual software. Many of those utilities define new aliases, functions - those things wonāt work in eshell.#2020-11-0314:59otwieraczssh-agent should work - you should be able to perform ssh-add assuming SSH_AUTH_SOCK gets set correctly in eshell from parent process.#2020-11-0314:59otwieracz> env
(...)
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.tfJGULxVPd/Listeners
(...)
#2020-11-0315:00otwieraczBut ~/.profile is only executed by sh-compliant shells which eshell is not.#2020-11-0315:01otwieraczAnd IIRC everything you want to have in .profile should be translated into elisp code put into .emacs#2020-11-0408:41murtaza52great thanks, I am using ansiterm as you had suggested#2020-11-0312:15otwieraczAre you sure you want to use eshell ?#2020-11-0312:15otwieraczBecause, from what you are saying, it seems like a bad choice for you.#2020-11-0312:36EdmundHas anyone ever run into the below issue trying to start a repl:
[nREPL] Starting server via "c:/Program Files/Leiningen/lein.bat" update-in :dependencies conj ^"[nrepl \^"0.8.2\^"]^" -- update-in :plugins conj ^"[refactor-nrepl \^"2.5.0\^"]^" -- update-in :plugins conj ^"[cider/cider-nrepl \^"0.25.4\^"]^" -- repl :headless :host localhost
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: java.lang.NumberFormatException: Invalid number: 0.8.2
at clojure.lang.LispReader.readNumber (LispReader.java:352)
clojure.lang.LispReader.read (LispReader.java:278)
clojure.lang.LispReader.readDelimitedList (LispReader.java:1398)
clojure.lang.LispReader$VectorReader.invoke (LispReader.java:1347)
clojure.lang.LispReader.read (LispReader.java:285)
clojure.lang.LispReader.read (LispReader.java:216) clojure.lang.LispReader.read (LispReader.java:205)#2020-11-0314:16practicalli-johnnyMy first guess would be to check for a .lein/profiles.clj file, which I assume should be in what ever Windows thinks is your home directory.
If that fle it exists, try move it to a different location or rename the file.
Otherwise it sounds like a bug with the windows install of Leiningen or a bug in cider. Possibly with the path not being interpreted correctly.
I do not have a windows system to try and replicate the issue, sorry.#2020-11-0314:45EdmundThanks let me try those options. I've tried starting the repl using powershell and lein directly and it works (lein repl). Let me try this. I've never seen this error.#2020-11-0315:07practicalli-johnnyIf the issue is related to windows, there is the #clj-on-windows channel. The error suggests to me that its not reading the auto-injected dependencies from Cider correctly. You could try getting the command line from the Spacemacs message buffer, SPC b m , it should show the command that cider-jack-in used to try start the repl. Or failing that, use SPC u before cider-jack-in to see the command. Then try that command using a windows terminal / powershell...#2020-11-0315:12EdmundIt looks like its this command:
update-in :dependencies conj "[nrepl \"0.8.2\"]" -- update-in :plugins conj "[refactor-nrepl \"2.5.0\"]" -- update-in :plugins conj "[cider/cider-nrepl \"0.25.4\"]" -- repl :headless :host localhost
and I can see where its reading the 0.8.2 where its failing.
Running this with "ava.lang.RuntimeException: EOF while reading"#2020-11-0315:51EdmundAfter bouncing into this article: https://www.gitmemory.com/issue/clojure-emacs/cider/2890/674136255
Removing java jdk and installing Java Runtime.. solved the problem. Now idea why the JDK wouldn't work. Thanks for all your help and an awesome tool.#2020-11-0315:58practicalli-johnnyGlad its resolved, I would not have thought of changing from JDK to JRE.#2020-11-0314:11practicalli-johnny@murtaza52 If you cannot find help using eshell, you could use your operating system shell from within Spacemacs. Then any configuration of the OS shell should be available.
https://practicalli.github.io/spacemacs/install-spacemacs/eshell.html#multi-term---use-operating-system-shell#2020-11-0314:19murtaza52@jr0cket thanks, I think that works better for now#2020-11-0314:53otwieracz@murtaza52 or just use ansi-term instead of eshell.#2020-11-0315:02practicalli-johnny@murtaza52 or vterm if you want the latest way of using a terminal in Spacemacs https://develop.spacemacs.org/layers/+tools/shell/README.html#install-vterm#2020-11-0408:42murtaza52@jr0cket @slawek098 thanks for the replies, ansiterm and multiterm solves it. what is the diff between both of them, as I see one uses the default shell and the other allows me to choose the shell.#2020-11-0408:45otwieracz@murtaza52 IIRC only ansi-term is (or rather should be) ansi-compatible. This means that text-ui software based on ncurses and other similar toolkits (which do āadvancedā drawing in terminal) is more likely to work here.#2020-11-0806:36SebastianHi, totally new to Emacs and Spacemacs and trying to get it up and running. I'm using https://develop.spacemacs.org/layers/+lang/clojure/README.html#starting-a-repl-from-spacemacs and I can start a REPL using , ' , but other commands are not defined or different. I'm wondering why this is as it makes it hard to follow the descriptions#2020-11-0809:53practicalli-johnny@sebastian.goettschkes If the key bindings are all different, then it seems likeyou are running an older version of Spacemacs. Switch to develop for the latest version
https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html#2020-11-0809:54practicalli-johnnyIt's a strange comments to understand though, as most of the key bindings have been added, only a few have changed.#2020-11-0809:57practicalli-johnnySee http://cider.mx for the documentation for using CIDER. Spacemacs documentation is only there to help installing, it not designed to be a user guide#2020-11-0810:15SebastianOk, thanks. I was wondering if anything went wrong as some (but not all) commands do not work. I'll switch over to the develop branch and try again#2020-11-0817:47murtaza52hi is there an integration of re-jump https://github.com/oliyh/re-jump.el/blob/master/re-jump.el, or some other reframe layer in spacemacs ?#2020-11-0818:50practicalli-johnnyI haven't seen any re+frame related packages in the Clojure layer for Spacemacs.
Try adding it via `dotspacemacs-additional-packages in your . spacemacs file, its only one function and key binding, so should work.
You might need to add the key binding as a hook in .spacemacs to make it work#2020-11-0913:56AndrosHas anyone managed to have autocomplete the classes in HTML? For example, class=āfooā.#2020-11-0914:09practicalli-johnnyI've done HTML tags. I wonder if there is LSP for html? That should do classes if it's not there already#2020-11-1020:00murtaza52I have buffers from multiple projects open, I would like to close all buffers except for 1 project, how do I do that ?#2020-11-1020:24practicalli-johnnyI use layouts in Spacemacs to manage buffers by project. It would seem SPC l K will kill all other buffers that are not in the current buffer.
Not at computer, so haven't tried
https://practicalli.github.io/spacemacs/spacemacs-basics/working-with-projects/layouts.html#2020-11-1020:29practicalli-johnnyThere might be something in projectile, but never looked for this.#2020-11-1023:12murtaza52thanks let me try layouts#2020-11-1023:14murtaza521. how do I change the clojure formatting config in spacemacs ? (I am using practicall's spacemacs.d)
2. is there a way to disable automatic clojure formatting on a buffer ?#2020-11-1100:05zaneThese might help you get where youāre going:#2020-11-1100:05zanehttps://github.com/clojure-emacs/clojure-mode#indentation-options#2020-11-1100:05zanehttps://docs.cider.mx/cider/indent_spec.html#2020-11-1108:56practicalli-johnnyLook at lines 930 to 940 in the practicallli/spacemacs.d config. There are three formatting setting for clojure, align argument, align forms, aggressive indent.
Comment these as you wish (and restart)#2020-11-1110:33murtaza52@U050CT4HR @U05254DQM thanks that resolved it !#2020-11-1109:03cdpjenkinsDoes anyone else notice that Emacs hangs when using Spacemacs? Since I moved my emacs config to Spacemacs, I find that, quite often, the whole of Emacs will hang and become so unresponsive that I have to kill it. Iāve never experienced anything like this with Emacs before but am a bit of a noob when it comes to debugging Emacs problems so have no idea where to start.
Iām on Emacs version 27.1 (9.0) from https://emacsformacosx.com/ and the Spacemacs develop branch (commit ab52131d9 if anyoneās interested).#2020-11-1109:21spfeifferNo, absolutely not. No such problems here (but Linux, not Mac).#2020-11-1109:58murtaza52I was having the problem. mostly when my memory got used up.
now I dont know if its connected, but lately I have been using practicalli's spacemacs config, and it has been a much more smoother experience.
so lately no hangups, I think its a combination of the spacemacs config, and also much less resources being consumed.#2020-11-1110:38cdpjenkinsDoes emacs do anything special with memory (like does it have a maximum heap size like the JVM or anything weird like that)? Iāve got 16 gig in this laptop and Iām not expecting to be low on total available memory.#2020-11-1110:38cdpjenkinsAnyhoo I guess I can give Practicalliās config a go at some point and see if I get different behaviour.#2020-11-1110:41murtaza52I dont think it was emacs that was consuming memory. just the projects I was working on had a large memory footprint. so when the system memory ran low, emacs became unresponsive.
also in general I had found out of box spacemacs to be a bit sluggish at times. I have not had that problem with the new config.#2020-11-1111:12practicalli-johnnyProfiling is straightforward in Spacemacs
https://practicalli.github.io/spacemacs/install-spacemacs/troubleshooting.html#profiling-emacs
Understanding the results may take some time.
Starting with a default Spacemacs setup is useful to see if there are any issues.
I haven't experienced any issues with my configuration either, except on a few nightly builds of Emacs 28, but that is to be expected.#2020-11-1111:14practicalli-johnnyI've seen some people have performance issues with Mac and Emacs, so may be another aspect to search on for help.#2020-11-1119:06zane@U053B97JX Do you happen to use posframe? I was experiencing lockups when I entered certain key combinations for a while, and I think posframe was somehow the culprit.#2020-11-1119:10cdpjenkinsIād not heard of posframe before but it appears that it has been installed in my emacs at some point (package-list-packages shows it as deleted which seems suspicious to me).#2020-11-1200:01zaneProbably a transitive dependency of something you were using. Perhaps a transitive dependency of Spacemacs (or Emacs) itself.#2020-11-1217:23Gleb PosobinI've been having problems with both spacemacs and doom Emacs when running clojure: it would hang up every day or so at random point, the screen would not refresh but interestingly the window title would change when I pressed keys to switch buffers. The only option would be to kill it. I switched to this Emacs a week ago, haven't had a problem yet: https://github.com/railwaycat/homebrew-emacsmacport
Plus Emacs seems more responsive now.#2020-11-1219:22cdpjenkinsI should add that I used to use a base emacs from https://emacsformacosx.com/ with tools like clojure cider, etc added from melpa and a very small amount of customisation. It didnāt look pretty but worked ok. But I do like spacemacs (and prefer it to what I had before) and would like to debug and fix whatever causes it to hang so I can keep using it.#2020-11-1219:23cdpjenkinsGleb, do I understand correctly that youāre now using Spacemacs on top of homebrew-emacsport and that it works ok? Iāll give that a try if so.#2020-11-1219:23Gleb PosobinI am using Doom, but it was misbehaving in the same way as spacemacs.#2020-11-1219:24Gleb PosobinOtherwise yes, it has been working ok for the past week.#2020-11-1222:36zane@UQ4RJ22EA Might be this issue? https://github.com/d12frosted/homebrew-emacs-plus/issues/137#2020-11-1223:00Gleb Posobin@U050CT4HR Maybe, but they seem to be talking about glitches, not a complete freeze I experienced.#2020-11-1309:13cdpjenkinsYeah same here, itās a complete freeze that I keep getting šæ#2020-11-1210:02Karol WójcikDoes anyone knows how can I limit counsel/ivy search to only specified file extension?#2020-11-1403:09zane@UJ1339K2B For e.g. counsel-rg you can pass additional arguments to rg by putting them after --. So, for example, you could SPC SPC counsel-rg RET then type def -- -g*.cljc to only search .cljc files.#2020-11-1509:49Karol WójcikThank you very much @U050CT4HR. That works!#2020-11-1403:04zaneAnyone have a sense of why SPC e n would be failing with clj-kondo warnings? I see the warning in SPC e l, but SPC e n doesnāt want to jump to it. (Also, doom-modeline is showing an incorrect flycheck status icon.)#2020-11-1403:11zaneAlready logged: https://github.com/syl20bnr/spacemacs/issues/12919#2020-11-1407:44zaneIām curious whether anyone else can repro this: https://github.com/syl20bnr/spacemacs/issues/14133#2020-11-1615:39taka2I set "jj" for evil-escape-key, but I don't want to escape from visual mode by using "jj". How can I set?#2020-11-1617:17practicalli-johnnyI assume this is why jk or fd are used as the escape key bindinf, as they won't clash.
Using jj as escape would clash with lots of things I do. I can't advise using that approach. Good luck.#2020-11-1711:53practicalli-johnnyI'm trying out vimish-fold this week as its now a folding option in .spacemacs, in Spacemacs develop.
https://github.com/alexmurray/evil-vimish-fold
I have been using evil folding, but its not quite as specific as I'd like. I'm curious as to what everyone is using for folding code?#2020-11-1818:21zaneIāve been meaning to use folding more! Iāll check out vimish-fold.#2020-11-2001:04zaneIād be interested to hear how you use the more specific folding features from vimish-fold!#2020-11-2001:04zaneIf you feel like sharing, that is.#2020-11-2009:14practicalli-johnnyI've just folded regions so far, visual select and then fold.
I've been busy with non-coding things this week, so haven't had the opportunity to do more with it yet#2020-11-1917:03practicalli-johnnyI am doing more with the cider-inspector (video coming soon) and noticed that there are several inspector related commands without key bindings (inspect last result, function, expression, last-expression)
I am raising a pull request (when GitHub lets me - PR's still seem to be degraded) to add key bindings under the SPC m d v menu, , d v in Evil normal.
https://github.com/jr0cket/spacemacs/blob/cider-inspect-key-bindings/layers/%2Blang/clojure/packages.el#L212-L216
The only key binding change is that , d v is now , d v i , all other changes are addative only.
Any feedback welcome. I imagine it will take a few days to approve the change by the Spacemacs maintainers (once I can create the PR on GitHub)#2020-11-1917:05practicalli-johnnyThe inspector is a really useful tool to keep open, especially when working with a lot of nested data structures or large data sets (more than 100 elements)
Using the inspector rather than the REPL buffer also means Emacs wont slow down due to the REPL buffer getting too large.#2020-11-2221:10Ben SlessHow about putting the menu under V and not v? Once it's open it always updates to the last result anyway. I find dv to be easy enough to reach for and cover most use cases, unless I'm missing something fundamental#2020-11-2222:38practicalli-johnnySpacemacs convention is to use lower case characters where possible, so v i should be used over Shift v i , especially as there are several really useful inspector functions under , d v sub menu. If it was just one additional function and that function was a more destructive version of dv then I could have made a case.#2020-11-1920:01niveauverleihIs there a way to launch a clojure file and a corresponding linked nrepl from the command line?#2020-11-1920:07practicalli-johnnyCan you elaborate? I am afraid I don't understand what you are trying to achieve?
Is the file part of a project?
What Clojure project tool are you using, Leiningen, Clojure CLI, boot.
How is the linked Repl started?
How is a repl linked to the fille?
Should Cider start the repl or connect to it?
Is this Clojure or Clojurescript?
I am not really clear what launching a file means without more context#2020-11-1920:12practicalli-johnnyI assume you mean something different to just running lein repl or clj#2020-11-1920:15niveauverleihSometimes I want to quickly try out some clojure command. I have a project "fiddle" with "fiddle.clj" under src. I want to place a shortcut on my de5that launches spacemacs, opens fiddle.clj, starts a cider REPL and connects to it. I could run "emacs fiddle/stc/fiddle.clj" and "cd fiddle: lein repl"in parallel but that doesn't link my spacemacs session to the REPL.yet.#2020-11-1920:15niveauverleih...on my desktop...#2020-11-1923:40practicalli-johnnySounds like some elisp is required. I am guessing you would need to write a function enough to start a REPL, or connect to a running one (starting might be easier as the port would be taken care of).
I am not sure how to decide when to trigger such a function, it would need to be run after the file is loaded I guess, but no idea what to trigger it off unless it's a specific file name, but that seems very bad code.#2020-11-1923:43practicalli-johnnyTry asking in the #cider channel about automating the startup of a repl from elisp#2020-11-1923:44practicalli-johnnyI think it's just simpler keeping Emacs open and the repl running. Then it's just alt-tab#2020-11-2007:20niveauverleihThank you! I prefer to not keep it up and running all the time (I'm talking about the spacemacs setup on my phone)). I'll try in the #cider channel.#2020-11-2611:24practicalli-johnnyI got https://github.com/tarsius/keycast to work in Spacemacs, so now it shows key bindings and commands in the mode-line. This should be great for the videos I'm recording and my live coding broadcasts with Spacemacs.
Its a bit of a hack, so have raised an issue to ask how to add keycast properly to Spacemacs.
The config I am using is included in syl20bnr/spacemacs#14169
If you have any suggestions on how to improve this or create a layer (still on my todo list), please feel free to comment. Thanks.#2020-11-2620:16zaneSee also https://github.com/lewang/command-log-mode.#2020-11-2623:55practicalli-johnnyI used to use command-log mode, which is already part of Sapcemacs, but it takes up too much space in the frame, especially when creating screencasts or live broadcasts. Tweaking the text and window size doest really help.
It's also not set up to change color when switching between dark and light themes without going into the customise menu and manually changing the colour. The default colours do not work with my light theme.
I do find command-log useful for finding those accidentally pressed key bindings, as you see a long history of actions.#2020-12-0112:37Androshi#2020-12-0112:39AndrosIām trying to work with SASS but itās impossible. Has anyone been able to? In my case a message jumps every time I press a key.#2020-12-0112:39AndrosTry installing a more recent version of sass, and please open a bug report if the issue persists in the latest release. Thanks!
#2020-12-0112:39AndrosAnd... yes, I have the latest version of npm.#2020-12-0221:48Drew VerleeIf i user cider-find-var from my project to a dependency i get the expected result. However, sense i'm no longer in a project (projectile) i can't really search around. Anyone have a good way to search dependencies?#2020-12-0301:32practicalli-johnnyIf the source of a library dependency is avalable, I just clone that SPC g c into a new layout SPC l l
For Java, I downloaded the source code and can browse that from jar files just like the Clojure standard library. The Jar just needs to be on the Class path and it should work (assuming the jar contains the information you need).#2020-12-0318:00lreadMaybe someone else noticed this already, but I just noticed that https://github.com/syl20bnr/spacemacs/branches. Makes sense.#2020-12-0318:12practicalli-johnny@lee the default branch was changed to develop to stop an issue with raising a pull request (which used to time out by doing a comparison with master).
This happen a week or so ago, after I raised the PR to add cider-inspect key bindings#2020-12-0318:28lreadYou are a force of good, @jr0cket! simple_smile#2020-12-0320:58practicalli-johnnyIt wasn't just me,but I appreciate the kind words āŗļø#2020-12-0320:06cjsauerHas anyone else noticed spacemacs periodically āflickeringā since updating to Big Sur on Mac?#2020-12-0320:06cjsauerIt happens a few times a minute for meā¦#2020-12-0320:58practicalli-johnny@cjsauer I wonder if that's related to HiDPI issues with Emacs on Mac.#2020-12-0320:58cjsauer@jr0cket ah could be. Is that a known problem?#2020-12-0321:04practicalli-johnnyI have seen some issues about rendering on hi dpi, but not flickering specifically.
Make sure your font size setting in .spacemacs is a decimal number, e g 18.0 rather than 18.
I suspect its some Graphics driver incompatible between Emacs and Mac, so maybe not related.
I'd suggest a general search using 'Emacs' and the version of OSX and flickering
Or try install Emacs from a different source, e.g homebrew, emacsformacosx
It would be surprising if it's Spacemacs specific#2020-12-0416:21cjsauerOh! I believe I was indeed setting my font size incorrectly. No more flickering (yet). Thank you so much!#2020-12-1423:32John OerterForgive me if this is a common question, but how can I wrap an expression in [] with spacemacs and evil-lisp-state? I know that SPC + k + w wraps in parens but can't figure out how to wrap in other Clojure forms#2020-12-1505:43jumarIf it's already wrapped with () you can use , r c [ to convert it to a vector.
Or you can use the y s motion (read "you surround" š )
E.g. y s $ [ surrounds everything from the current position till the end of line with []#2020-12-1511:10practicalli-johnnyI usually do SPC v to select a word, s to surround with a character, ] to surround with square brackets without a space, or [ to include a space.#2020-12-1511:25jumarThat's nice too, thanks for sharing.#2020-12-1511:41practicalli-johnnyHmm, v e would also work if you are at the start of the word and is the only word to be surrounded. SPC v is nice as you can keep on expanding the selection with v , eg. SPC v v v V and shift-v to shrink the selection.#2020-12-1512:14practicalli-johnnyI use SPC v with ~ when I want to capitalise words, its very handy.#2020-12-1514:47John OerterThanks @U06BE1L6T and @U05254DQM! That's exactly what I was looking for#2020-12-1612:16kah0onaHi folks, very basic question but: iād like to add a binding to the clojure minor mode. Where is the preferred way to do this?
Iād like , e ; to be mapped to 'cider-eval-defun-to-comment#2020-12-1815:08erwinrooijakkersI have this:
;; Print eval sexp
(define-key evil-normal-state-map (kbd "C-;") 'cider-pprint-eval-last-sexp-to-comment)
in dotspacemacs/user-config of .spacemacs
C-; prints evaluation to comment. š#2020-12-1612:17kah0onai assume i shouldnāt just edit /layers/+lang/clojure/packages.el (it could work of course)? Or should I fork spacemacs or something?#2020-12-1612:20kah0ona@jr0cket (yes iām watching your video š )#2020-12-1612:21practicalli-johnny@kah0ona Hello, the example you gave is already a key binding. I suspect you are using a very old version of Spacemacs, i.e. version 0.200.
I recommend using Spacemacs 0.300, available on the develop branch
A guide to switching successfully is at https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html#2020-12-1612:21kah0onaaha!#2020-12-1612:22kah0onaI just found your video and content, so I ām guessing some studying on your blog would solve lots of questions š#2020-12-1612:22practicalli-johnnyMaybe take a look at the book when you have time, or feel free to ask questions (its how I learn how to write an even better book)#2020-12-1612:22kah0onaokay thanks#2020-12-1612:23kah0onacongrats on the cognitect sponsoring btw, well deserved. through that post I found your video, fwiw#2020-12-1612:23kah0onaok thanks. i kind of started using spacemacs in 2017, but havenāt really tweaked it very much, but your vid inspired me to improve some stuff#2020-12-1612:23practicalli-johnnyI also have a Spacemacs config if you want all the settings I use. Take a quick look at the install process to see if its for you https://practicalli.github.io/spacemacs/install-spacemacs/#2020-12-1612:24kah0onagreat! much appreciated, will dive into this š#2020-12-1612:25practicalli-johnnyI might need a new install version of the video now that Emacs 27 is out... which works very well with Spacemacs. Apart from that it should all work#2020-12-1612:29practicalli-johnnyGood to know how you found the Practicalli content, hopefully it will help even more people now.#2020-12-1612:31kah0onaiām on spacemacs 0.200.1 @ emacs 27.1#2020-12-1612:31kah0onaso will upgrade that soon#2020-12-1612:31kah0onausing your guide#2020-12-1612:32practicalli-johnnySpacemacs 0.300 has 2.5 years worth of updates and fixes. Its what I have used for the last 2.5 years š#2020-12-1612:32practicalli-johnnyThere are a few key binding changes, but almost all are additive#2020-12-1612:32kah0onayeah really need to upgrade#2020-12-1612:32kah0onamissing out#2020-12-1708:34murtaza52In spacemacs navigation on namespaced keywords is not working for me, SPC m g g does not take me to the definition of a ns keyword. How do I get it working ?#2020-12-1710:51nmkip#2020-12-1711:11practicalli-johnnyCIDER roadmap suggests socket repl is not supported
https://github.com/clojure-emacs/cider/blob/master/ROADMAP.md#socket-repl-support-and-potentially-unreplprepl-support-as-well
From my own limited undertanding, Socket repl is a very simple streaming protocol and Cider uses nREPL client-server with a specific message protocol.
They are both using standard 'network' protocols underneath, so can connect, but they don't understand how to talk to each other.
See articles by Oliver Caldwell if you want to know more about Socket repl (there are several articles from 2019)
https://oli.me.uk/exploring-repl-tooling-with-prepl/
As far as I know, only Chlorine (Atom editor) supports socket repl. Oh and now Clover which is a port of Chlorine to VScode.
I've seen a few projects for Emacs and Socket repl, usually with unrepl. No idea if they work or what limitations they have.#2020-12-1711:12practicalli-johnnyIf you do find something that works, I would be interested to hear about the experience it provides. Thanks#2020-12-1711:52nmkipCool thanks! I was trying reveal once again in emacs.#2020-12-1711:53nmkipI'll have to use vscode or cursive then š In those editors I struggle a bit with vim and parens#2020-12-1711:53nmkipI have parens under control with vim and spacemacs#2020-12-1710:52practicalli-johnny@murtaza52 Hmm, I am assuming you are refering to keywords defined as Clojure specs, as keywords themselves are their own definition
I havent found any CIDER commands that will jump to the location of spec definition, given a spec name.
SPC m g s runs cider-browse-spec and shows the spec details, but does not jump to the location in the code where its defined. This command simply looks at the spec registry.#2020-12-1711:48jumar@murtaza52 @jr0cket cider-find-keyword used to work for me to jump to a keyword in another namespace - I used it to jump to a spec definition quickly.
But it got broken a long time ago - I'm not sure when....#2020-12-1712:57shanAnyone had problems with yasnippet disabling smartparens mode and not re enabling it?#2020-12-1715:02practicalli-johnny@shan I havent noticed that issue. smartparens mode is restored for me once I've cleared any tab stops from within yasnippet. (Spacemacs develop - updated a few weeks ago)#2020-12-1715:03shanhmm, I'm on develop and updated it today.
Also updated my packages.
I think it might be due to using Using yas-hippie-try-expand#2020-12-1715:05shanThere does seem to be some stuff that should be re-activating smartparens here:
https://github.com/syl20bnr/spacemacs/blob/develop/layers/+completion/auto-completion/packages.el#L275#2020-12-1715:08shan@jr0cket
Can you check the *Messages* buffer after you use yasnippet and see if you have
Using yas-hippie-try-expand
Maybe I'm not exiting out of yasnippet correctly#2020-12-1715:24practicalli-johnnyI dont see that command in the *Messages* buffer. I do get this though [yas] Committing snippets. Action would destroy a protection overlay. [2 times]#2020-12-1715:38practicalli-johnnyMy guess would be a change in the yassnippet package - there have been a few small changes it seems https://github.com/AndreaCrotti/yasnippet-snippets#2020-12-1817:11practicalli-johnnyWarning about upgrading to latest Spacemacs develop.
Someone has added Clojure lsp support and made it the default if you use lsp layer. Not sure what happens if you do not have the lsp server binary on the path... So you may experience a significant difference and lack of performance to Clojure development, especially if running lsp and CIDER together without customising lsp to avoid conflicts.
Adding the following to .spacemacs should ensure that CIDER is used regardless of other layers you are using. Then you can choose when you want to start learning how to use clojure-lsp.
clojure :variables
clojure-backend 'cider
Unfortunately this setting was not clearly documented in the Clojure layer docs, so I'll try find time for a PR to fix this.
The change was made 24 days ago and details are here
https://github.com/syl20bnr/spacemacs/commit/6d39cd5548768bed63cc18d51b74efb78f39963d#2020-12-1818:59practicalli-johnnyIf you do have time to spare to look at lsp - and it will take some time as there are conflicting UI aspects when running both CIDER and lsp - take a look at the documentation https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/
There will be a guide as some point for using Cider and LSP together, but if time is precious I recommend waiting until that is done.
If you do try and have a successful setup, I am sure we would all be interested to hear about it. Thanks.#2020-12-1819:01practicalli-johnnyWatching this issue might be a way to keep track of documentation for Clojure and clojure-lsp
https://github.com/emacs-lsp/lsp-mode/issues/2185#2020-12-1819:27practicalli-johnnyI've updated my Spacemacs configuration with the cider default back-end, so even if you have lsp installed you can choose when to use it by updating the config to explicitly use lsp.
https://github.com/practicalli/spacemacs.d/blob/live/init.el#L63#2020-12-1820:11John OerterThanks @jr0cket. I'm a new spacemacs user. Does this affect the common-lisp and emacs-lisp layers?#2020-12-1820:13practicalli-johnnyThe specific change I mention only affects Clojure as it's a specific change to that layer.#2020-12-1820:20practicalli-johnnyIf you don't include the lsp layer it won't affect them. Check the layer documentation for each language.
Usually lsp has to be specifically enabled in a language layer, but this is not guaranteed in the way LSP was added to Clojure#2020-12-1820:21John OerterOkay, thanks! Emacs and spacemacs has been a fun adventure for me so far#2020-12-2116:32jumarIs there an easy way to transform the first form into the second?
(testing "abc"
(let [a 1]))
;;=>
(let [a 1]
(testing "abc"
))
#2020-12-2118:28sgepigon(cljr-expand-let) ;; SPC m r e l#2020-12-2118:28sgepigonNote: This is in spacemacs if you enable clj-refactor: https://practicalli.github.io/spacemacs/refactor/clj-refactor/#enable-clj-refactor#2020-12-2120:38erwinrooijakkersthis can be done with convolute of lisp-mode with SPC-kc#2020-12-2120:39erwinrooijakkersSee more convolute examples here: https://youtu.be/D6h5dFyyUX0?t=101#2020-12-2120:43erwinrooijakkersThe ,rel example I did not know, seems to do something similar but only with the first let#2020-12-2211:51jumarWhat's the best way to replace certain characters in a String with new lines?
I tried with the usual "vim-style" (https://stackoverflow.com/questions/71323/how-to-replace-a-character-by-a-newline-in-vim) replace but \r just produces ^M in the source buffer.
E.g. I have a stacktrace as a single-line string and want to split it into multiple lines
a.clj: 25 b.clj: 58 b.clj: 365 d.clj: 51 java.lang.Exception: ...
# should become:
a.clj: 25
b.clj: 58
b.clj: 365
d.clj: 51
java.lang.Exception: ...
I tried#2020-12-2211:54practicalli-johnnyI wonder if iedit or multiple cursors would be useful for this... Will check when back at a computer#2020-12-2212:06jumarI ended up using sed like this:
echo "a.clj: 25 b.clj: 58 b.clj: 365 d.clj: 51 java.lang.Exception: ..." | sed -E $'s/(: [0-9]+)/\1\\\n/g' | tee >(pbcopy)
Still would be useful to know how to do it in emacs.#2020-12-2212:25practicalli-johnnyUsing iedit:
SPC v v with as many v's needed to select the region
SPC n r to narrow to the region (so I can select spaces just from that region
v on one of the spaces to select the space character as a pattern
SPC s e to create iedit cursors on each space, n to jump to the next cursor and TAB to toggle the iedit cursor, removing every alternate cursor.
i for insert mode and RET to create new lines
ESC to leave insert mode, ESC to leave iedit mode
It sounds a lot, but its very quick to do if used to using iedit and narrowing.#2020-12-2212:33jumarI didn't quite get the thing with n and TAB - couldn't make it work.
I can split it that way with simply replacing every space but there can be 3(?) spaces in each row (one of them is ommited from the example so there are only two)
I basically need to split on digits/regex, I think.#2020-12-2212:37practicalli-johnnyMultiple cursors is simpler
v to visually select the first space where you want to cut the line
C-n to place a cursor and jump to the next space
C-t to skip placing a cursor at that position and jump to the next space
Then alternate C-t to skip a cursor at the space and C-n to place a cursor at the place
i and RET when you have all the cursors needed#2020-12-2212:38practicalli-johnnyIf there is a varing number of spaces, simply C-t until you get to the place where a space should have a return charater and press C-n#2020-12-2212:40practicalli-johnnyOh and when finished, g r q to kill all the cursors and go back to just one.#2020-12-2213:36spfeifferI did it with SPC SPC replace-string, then the character i want to replace, then C-q C-j as replacement. Most likely not the most elegant way, but did the trick.#2020-12-2213:37spfeifferC-o instead of C-q C-j works, too.#2020-12-2215:50practicalli-johnnyI created a quick video as an example of using iedit and multiple cursors
https://youtu.be/SCEQtSSb7Tc
I shoud do more of these and join them up into a little demo of these really useful tools#2020-12-2216:15Gleb Posobin:s/;/\n/g#2020-12-2510:55erwinrooijakkersI updated spacemacs develop branch but now get:
Error (use-package): debug/:init: Symbol's function definition is void: which-key-add-keymap-based-replacements
Error (use-package): display-line-numbers/:init: Symbol's function definition is void: which-key-add-keymap-based-replacements
Error (use-package): elisp-slime-nav/:init: Symbol's function definition is void: which-key-add-keymap-based-replacements
Warning (initialization): An error occurred while loading '/Users/erooijak/.emacs.d/init.el':
Symbol's function definition is void: which-key-add-keymap-based-replacements
Any idea how to fix this which-key-add-keymap-based-replacements error?#2020-12-2511:00practicalli-johnnyDid you updated the packages as well - `SPC f e U?
Did you updated your .spacemacs file from the spacemacs.template - SPC f e D
I assume the error message occured when restarting Emacs. I assume you have tried restarting a couple of times#2020-12-2511:01practicalli-johnnySuggest moving your .spacemacs file out of the way (rename the file) and start Emacs#2020-12-2511:01erwinrooijakkersthanks. i restarted a few times#2020-12-2511:01erwinrooijakkers.spacemacs i did make a compare#2020-12-2511:01erwinrooijakkersand took some changes, but not all#2020-12-2511:02erwinrooijakkersiāll try to move and then do compare#2020-12-2511:03erwinrooijakkersthe same happens actually with moved .spacemacs file#2020-12-2511:03erwinrooijakkersmaybe remove the folder#2020-12-2511:03erwinrooijakkersemacs.d#2020-12-2511:04practicalli-johnnyIf you get errors with the .spacemacs file that Spacemacs creates, then it sounds like the .emacs.d config was broken by the git pull to update#2020-12-2511:05practicalli-johnny.emacs.d/cache and .emac.d/private are the only directories that contain data that can't be reproduced#2020-12-2511:05erwinrooijakkersiāll remove it completely#2020-12-2511:05erwinrooijakkerssmart?#2020-12-2511:06erwinrooijakkersor maybe make a backup#2020-12-2511:07erwinrooijakkersi try with clean .emacs.d and my old .spacemacs now#2020-12-2511:07practicalli-johnnyI would move the .emacs.d directory rather than delete it, you can always delete when everything is working#2020-12-2511:07practicalli-johnnySuggest moving both .emacs.d and .spacemacs out of the way#2020-12-2511:08practicalli-johnnyMaybe even .spacemacs.env if you added anything to that too#2020-12-2511:09practicalli-johnnyMuch quicker to add your own changes to a working system#2020-12-2511:09erwinrooijakkersoh did not know that existed#2020-12-2511:09erwinrooijakkersthanks for the help i will get it to work with these hints!#2020-12-2511:09practicalli-johnnyIt's probably safe, especially if you didn't know it's there. Spacemacs will create a new one anyway#2020-12-2617:56erwinrooijakkersIt worked after removing .emacs.d and cloning a fresh one from the develop branch. Thanks for helping!#2020-12-2613:39prncsince ātap> is the new printā š are there any helper fns in cider or clojure mode for tapping? (e.g. like there are for pretty printing)?#2020-12-2613:44practicalli-johnnyI am not aware of any cider commands for tap>.
I tend to use cider-inspect rather than tap when using Emacs#2020-12-2613:50prncthanks!#2020-12-2615:48practicalli-johnnyI assume it wouldn't be too difficult to write some. I believe you can write a bit of elisp to call Clojure code and then bind that in an interactive function to a key#2020-12-2615:52practicalli-johnnyI have just been using a rich comment block to call tap functions for now.
https://github.com/practicalli/scicloj-notespace-simple-demo/blob/live/src/practicalli/notespace_demo.clj#L145
I also use a user.clj to run the portal data browser and add it as a tap source.
There is an example in the dev/user.clj file in the repository above#2020-12-2616:56prncThanks @U05254DQM. I use the cider inspector as well, but sometimes things like portal etc. can come in handy. Iāve ended up doing this:#2020-12-2616:56prnc(defun prnc/clojure-eval-tap ()
(interactive)
(cider-interactive-eval
(format "(tap> %s)"
(apply #'buffer-substring-no-properties
(cider-last-sexp 'bounds)))))
(spacemacs/set-leader-keys-for-major-mode 'clojure-mode (kbd "et") 'prnc/clojure-eval-tap)#2020-12-2616:56prncas a quick hack to see if I like this workflow#2021-12-2812:47Sergiois there a way to make eshell initialize with some env-vars by default? ideally I would like to use zsh by default and eshell while coding on clojure (with the config from zsh )#2021-12-2813:04jumarThere's spacemacs/edit-env which I think is applicable here#2021-12-2813:32Sergiothank you, Iāll try it#2021-12-3003:45Ezequiel BirmanYou can opt out of spacemacs managing environment variables by commenting the call to spacemacs/load-spacemacs-env it has pros and cons#2021-01-0112:14Janne SauvalaDuring the holidays I have been giving emacs another try to be my main dev tool. I really like spacemacs since it feels more familiar to me (I have been using IntelliJ and vscode). I would also like to try out doom emacs since I have been reading good stuff about it and one of my colleagues is using it. Have you tried doom and what is your opinion about it as a spacemacs user? Have you missed some features that you have in spacemacs but not in doom?#2021-01-0113:07practicalli-johnny@janne.sauvala I have tried Doom a few times over the last year.
My favourite thing about Doom is the mode-line theme, which I now use with Spacemacs.
Doom itself is missing too many tools for me to be productive. These things could be added / configured in Doom with some work, but that is simply duplicating what is in Spacemacs or having to manage more custom configuration.
I find Doom much slower to use as the key binding mnemonics do not make as much sense as the Spacemacs key design.
Yes, startup time is notably faster after the initial install, but startup time is trivial compared to the speed I can go when Emacs is running. I rarely restart Emacs anyway and there is Emacs client.
If someone wants minimal features and has a strong preferrence for Ivy over Helm, then they maybe some advantages to Doom.
From discussions, the most common advantage is the view that it's simpler to customize Doom, as there are very few abstractions on top of Emacs and it packages.
My own experience suggest it's a lot more work to start using rather Doom (partly because of the customisation I would require).
I assume as more people use Doom, some things will be added, but unless something bad happens with Spacemacs, I don't have the time to spare to craft the same experience in Doom as I already have in Spacemacs.#2021-01-0115:01Janne SauvalaThanks for the insightful response. I have followed your spacemacs guides and your configs were a huge inspiration. Your videos was one of the reasons I have been giving emacs another try.
Iām a huge fan of the mnemonic key bindings in spacemacs and it is good to know that doom customization would require extra time to get it bar with spacemacs. Iām still learning emacs in general and Iām grateful for every thing I donāt need to configure myself.
This makes me to feel comfortable to keep investing in spacemacs. š#2021-01-0115:18practicalli-johnnyI will review Doom again sometime in 2021 as I am sure both projects will continue to evolve. However, I suspect it's the Spacemac key binding that will keep me productive throughout the year.#2021-01-0417:37zaneI made the switch from Spacemacs to Doom and am happy with the change, but I agree with @U05254DQMās criticism regarding the keybindings / minimalism.#2021-01-0417:37zaneYou might be interested in joining the fledgeling #doom-emacs.#2021-01-0417:46zaneOne thing I do like about Doom is that it has forced me to learn how to accomplish tasks the vim-way. e.g. Using gr<motion> for evaluation, or gq<motion> for alignment / fill paragraph.#2021-01-0421:13griersonIāve start using Spacemacs and now getting these pop ups when I put my cursor on a function? how do I hide them?#2021-01-0422:28practicalli-johnny@grierson my fist guess this is LSP popup. If not using LSP for any language, then remove the lsp layer from.spacemacs.#2021-01-0423:34griersonThanks! Iāve been reading all your guides. It really helped me get started with Spacesmacs! ā¤ļøšš#2021-01-0422:29practicalli-johnnyOr if using LSP but not for Clojure, then set the Clojure backend to cider using a layer variable#2021-01-0422:30practicalli-johnnyhttps://clojurians.slack.com/archives/C09C8GRLY/p1608311515221700#2021-01-0422:32practicalli-johnnyIf you want to use LSP with Clojure, then take a look at the lsp-mode website and figure out which configs you wish to disable (not something I understand myself, sorry).#2021-01-0422:32practicalli-johnnyhttps://emacs-lsp.github.io/lsp-mode/#2021-01-0423:01Aaron Cooleyin dotspacemacs-configuration-layers, use:
(lsp :variables
lsp-ui-doc-enable nil)#2021-01-0423:38griersonyeh, that got it! Thank you! š#2021-01-0501:57practicalli-johnnyThere are many potential conflicts and changes to the CIDER experience when also running lsp for Clojure.
There is an effort to make these the same, although its lacking in documentation.
Some people have shared settings here and there, but I havent seen a well documented setup for LSP and CIDER together. Hopefully that will arrive some day, but this has been an issue for most of 2020 and a reason I havent use LSP for Clojure yet.#2021-01-0423:02Aaron CooleyI had to disable these for R. Couldn't find it in the ESS documentation, eventually figured out LSP was the culprit.#2021-01-0501:57practicalli-johnnyThere are many potential conflicts and changes to the CIDER experience when also running lsp for Clojure.
There is an effort to make these the same, although its lacking in documentation.
Some people have shared settings here and there, but I havent seen a well documented setup for LSP and CIDER together. Hopefully that will arrive some day, but this has been an issue for most of 2020 and a reason I havent use LSP for Clojure yet.#2021-01-0506:57Yehonathan SharvitI really enjoy spacemacs and I enjoy it even more with @jr0cket guides.#2021-01-0506:58Yehonathan SharvitThank you @jr0cket !#2021-01-0506:59Yehonathan SharvitI need some help regarding a weird behaviour on Spacemacs from terminal: when I switch to another app while being in a Clojure buffer, a [] is inserted automatically.#2021-01-0507:34Yehonathan SharvitSolved it with https://github.com/luxbock/evil-cleverparens/issues/58#issuecomment-717419683#2021-01-0507:34Yehonathan Sharvit@jr0cket it might worth mentioning it in your documentation. This weird behaviour drove me crazy!!!#2021-01-0517:04practicalli-johnny@viebel thanks for the information. I believe the issue describes a way to check for terminal and set keys differently. This type of configuration has been done in Spacemacs layers before, so would be a useful addtion as a PR.
I could add a Spacemacs in Terminal page to the book, to highlight the edge cases like this.
I'll add an issue to the Practicalli Spacemacs book and read through the cleverparents issue in more detail.#2021-01-0518:31Aaron CooleyI am following the Brave Clojure tutorial to get it up and running in Windows 10. However, CIDER jack-in-clj can't successfully start my REPL. Instead, I get an attempting to connect message followed by what looks like a stack trace that disappears before I can copy it or even screenshot it. Has anyone had success getting CIDER jack-in-clj to work (on Windows 10) through the usual means?
The only way I can get a REPL running in Spacemacs is to do the following:
⢠Go to terminal
⢠Type "lein repl :headless"
⢠Note down the host address and port (e.g. 127.0.0.1:57844)
⢠Use cider-connect and type in the host address and port manually#2021-01-0519:24practicalli-johnny@aaronsama Have you tried looking in the message buffer for errors, SPC b m Cider should send messages there, along with the startup command its using for cider-jack-in.
Following the Emacs setup in Brave Clojure is more than a little dated as far as I am aware and I would be surprised if it worked on any platform. There maybe updates in the brave clojure repos, but havent checked.
If using Windows 10, then Windows Subsystem for Linux (WSL) is recommended approach, assuming someone is okay using the basics of a Linux terminal.
Otherwise the Clojure Scoop for Windows is recommended for running directly on Windows. The scoop includes several very useful tools.
https://github.com/littleli/scoop-clojure/wiki/Getting-started
For any other approach or if these approaches do not work, suggest trying the #clj-on-windows channel for help or perhaps #leiningen channel.
When starting with Clojure it doesnt really matter if you use Leiningen of Clojure CLI tools, although eventually I would encourage you to use the Clojure CLI tools.#2021-01-0522:10Aaron CooleyOK, thank you for that tip. I've got the stack trace:
error in process sentinel: Could not start nREPL server: java.lang.NumberFormatException: Invalid number: 0.8.3
at clojure.lang.LispReader.readNumber (LispReader.java:352)
clojure.lang.LispReader.read (LispReader.java:278)
clojure.lang.LispReader.readDelimitedList (LispReader.java:1398)
clojure.lang.LispReader$VectorReader.invoke (LispReader.java:1347)
clojure.lang.LispReader.read (LispReader.java:285)
clojure.lang.LispReader.read (LispReader.java:216)
clojure.lang.LispReader.read (LispReader.java:205)
clojure.lang.RT.readString (RT.java:1878)
clojure.lang.RT.readString (RT.java:1873)
clojure.core$read_string.invokeStatic (core.clj:3815)
clojure.core$read_string.invoke (core.clj:3805)
clojure.core$mapv$fn__8445.invoke (core.clj:6912)
clojure.core.protocols$fn__8159.invokeStatic (protocols.clj:168)
clojure.core.protocols/fn (protocols.clj:124)
clojure.core.protocols$fn__8114$G__8109__8123.invoke (protocols.clj:19)
clojure.core.protocols$seq_reduce.invokeStatic (protocols.clj:31)
clojure.core.protocols$fn__8146.invokeStatic (protocols.clj:75)
clojure.core.protocols/fn (protocols.clj:75)
clojure.core.protocols$fn__8088$G__8083__8101.invoke (protocols.clj:13)
clojure.core$reduce.invokeStatic (core.clj:6828)
clojure.core$mapv.invokeStatic (core.clj:6903)
clojure.core$mapv.invoke (core.clj:6903)
leiningen.update_in$parse_args.invokeStatic (update_in.clj:13)
leiningen.update_in$parse_args.invoke (update_in.clj:9)
leiningen.update_in$update_in.invokeStatic (update_in.clj:36)
leiningen.update_in$update_in.doInvoke (update_in.clj:24)
clojure.lang.RestFn.applyTo (RestFn.java:146)
clojure.lang.Var.applyTo (Var.java:705)
clojure.core$apply.invokeStatic (core.clj:667)
clojure.core$apply.invoke (core.clj:660)
leiningen.core.main$partial_task$fn__7331.doInvoke (main.clj:284)
clojure.lang.RestFn.applyTo (RestFn.java:139)
clojure.lang.AFunction$1.doInvoke (AFunction.java:31)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:667)
clojure.core$apply.invoke (core.clj:660)
leiningen.core.main$apply_task.invokeStatic (main.clj:334)
leiningen.core.main$apply_task.invoke (main.clj:320)
leiningen.core.main$resolve_and_apply.invokeStatic (main.clj:343)
leiningen.core.main$resolve_and_apply.invoke (main.clj:336)
leiningen.core.main$_main$fn__7420.invoke (main.clj:453)
leiningen.core.main$_main.invokeStatic (main.clj:442)
leiningen.core.main$_main.doInvoke (main.clj:439)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.lang.Var.applyTo (Var.java:705)
clojure.core$apply.invokeStatic (core.clj:665)
clojure.main$main_opt.invokeStatic (main.clj:514)
clojure.main$main_opt.invoke (main.clj:510)
clojure.main$main.invokeStatic (main.clj:664)
clojure.main$main.doInvoke (main.clj:616)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.lang.Var.applyTo (Var.java:705)
clojure.main.main (main.java:40)#2021-01-0523:33shanSearching around for that error message leads to
https://github.com/clojure-emacs/cider/issues/2890#2021-01-0522:14Aaron CooleyWSL isn't an option for me as this is a work machine and is locked down. I will take a look at the scoop and the channels you suggested to see if I can get Clojure working natively in Windows.#2021-01-0609:05practicalli-johnny@aaronsama If you can run a REPL on the command line then you can always run cider-connect rather than cider-jack-in . Using connect makes the REPL process more robust as its not going to be killed if there is an issue with the editor. This is especially useful when you get used to having longer running REPL sessions.#2021-01-0613:00practicalli-johnnyIf you are using all-the-icons or doom modeline theme, then you should see a nicer solid Clojure logo in the mode-line rather than the original outline icon used.
My pull request was just merged, so updating all-the-icons, SPC SPC all-the-icons-install-fonts , should give you the solid version of the icon (which matches with the emacs, html and other language logos in the modeline)
https://github.com/domtronn/all-the-icons.el/pull/218#2021-01-0613:08practicalli-johnnyI do recommend the doom modeline theme, its very simple and elegant. I found it easier to customise the doom modeline theme than the spacemacs mode line theme.
My modeline customisation can be seen in recent videos, e.g. the video on https://practicalli.github.io/spacemacs/
The configuration is in the layer variables
https://github.com/practicalli/spacemacs.d/blob/live/init.el#L130
And custom components on the modeline are defined in dotspacemacs/user-config
https://github.com/practicalli/spacemacs.d/blob/live/init.el#L736#2021-01-0613:57Aaron CooleyThank you for your detailed response. Looks like there is a wealth of information on your github page, so I'll spend some time playing around with that.#2021-01-0811:21Yehonathan SharvitI decided to give another chance to GUI emacs (instead of terminal emacs)#2021-01-0811:22Yehonathan SharvitThe annoying thing is that when it gets stuck, I have to Force Quit the app (I am on mac) and then I need to restart all my projects#2021-01-0811:22Yehonathan SharvitWhile with the terminal emacs, Iād have an emacs session per project#2021-01-0811:57practicalli-johnnyThe only time I've ever had crashes is when using nightly builds of Emacs 28
Emacs 27 is latest stable version.
Also some distribution of Emacs seems better than others
When I had a Mac, I used http://EmacsForMacosx.com version. Spacemacs recommends a few homebrew recipes
https://practicalli.github.io/spacemacs/before-you-start/install-emacs.html#macosx#2021-01-0811:59practicalli-johnnyI use Layouts to switch between different project. It seems I have over 40 layouts now
https://practicalli.github.io/spacemacs/spacemacs-basics/working-with-projects/layouts.html#2021-01-0812:23Yehonathan SharvitThanks @jr0cket#2021-01-0812:23Yehonathan SharvitTrying it#2021-01-0905:53Gleb PosobinYes, had emacs hang up every couple of days in some other emacs distro, that one (http://emacsformacosx.com) works well.#2021-01-0906:11caumondHi @posobin, dont you have blinking frame ? I do with that distro. On bigsur but was the same with previous os version. I m not sure to know where it come frome, spacemacs emacs some module...#2021-01-0906:11Gleb PosobinWhat's blinking frame?#2021-01-0906:12caumondMy english maybe.. sorry. All the frame turns black during roughly one second and comes back.#2021-01-0906:14caumondIt repeats every few minutes. Kind of annoying but not critical#2021-01-0906:15Gleb PosobinI don't have that. But tbh I have also switched from spacemacs to doom emacs at around the same time, so maybe it is spacemacs. I remember emacs doing something like that, but with just clearing the screen and redrawing everything, not black screen (maybe because I am using a light color scheme?). I either got used to it and don't consciously notice it anymore or it disappeared after the switch.#2021-01-0906:15caumondI found people suggesting to change distro for that. http://But.as yo tell its working for you I was curious to know if you did something#2021-01-0906:16Gleb PosobinAlso not 100% sure that that is the distro I am using, sounds like it but not sure how I can check. I just switched it once and forgot.#2021-01-0906:18caumondSame for me, dont know how to investigate this without spending a huge amount of time of reinstalling everything different#2021-01-0906:20Gleb PosobinSwitching the emacs distro was painless. Uninstall one, install the other, full compatibility.#2021-01-0906:21Gleb PosobinSwitching from spacemacs to doom was harder since all the keybindings are different, had to adjust the config too. But still was pretty quick.#2021-01-0908:48caumondOk, I saw doom at the beginning but lost that idea. Starting with @jr0cket setup is an another option. I spend time at rhe beginning to understand by myself but my requirements are quite standard for a clojurian#2021-01-0908:55practicalli-johnny@caumond blinking Emacs is a sign of graphics driver issues or graphics rendering libraries, especially compositors.
I did have an issue with Emacs rendering a while ago and it was due to a particular Linux compositor. I changed compositor and Emacs was back to normal.#2021-01-0908:55caumondSo its true than it could be quick now I understand what i am.looking for#2021-01-0908:56practicalli-johnnyDoom is great if you have the time to configure it, but really doubt it will fix your issue.
The only way to be sure is to run Emacs without any configuration#2021-01-0909:00caumondI m working with macos x, big sur, even I think it was there already before. If I understand well the compositor I use is a part of macos, I feel strange to havr to change that. Am I right ?#2021-01-0909:04practicalli-johnnyI doubt the MacOSX engineers test their OS against Emacs, unfortunately.
My limited experience with Mac's suggest trying a few of the different versions of Emacs itself.
Emacs also 'recently' changed to Cairo library, so it may be easier to install a different Emacs#2021-01-0909:05practicalli-johnnyhttp://EmacsForMacosx.com should be a good choice for Mac, there are also a few homebrew recipes
https://practicalli.github.io/spacemacs/before-you-start/install-emacs.html#macosx#2021-01-0909:07caumondYes but im using emacsfor mac, so if follow you it should be in my setup. I will try with a blank emacs then spacemacs then your setup. I ll tell you. Thanks for the insight#2021-01-0909:07caumondI had the issue with my mac and a fresh macosx install (but sharing my spacemacs setup)#2021-01-0909:18practicalli-johnnyEmacsforMacOSX worked well for me for Emacs 26. However, both macosx and emacs have change graphics libraries since then. It may be that homebrew is a better choice for Emacs 27. I do not have a mac to test.
I also would not have upgraded to a new OS so soon as these kinds of issues are much more likely, but I assume that ship has sailed.#2021-01-0909:19caumondI bought a new imac and upgrade my laptop to have consistent experience ...#2021-01-0909:19caumondSo both are on big sur ship... š#2021-01-0909:25practicalli-johnny@caumond It seems your not the only one with this Emacs issue https://www.reddit.com/r/emacs/comments/jx0uog/has_anyone_else_noticed_some_flickering_on_big_sur/#2021-01-0909:27practicalli-johnnyIf you upgraded your laptop and that is where the issue occurs, try removing all the Emacs packages from ~/.emacs.d/elpa and restarting#2021-01-1112:15otwieracz^ same here#2021-01-1113:27practicalli-johnny@slawek098 have you tried deleting the .ELC files in .emacs.d/elpa or just deleting the packages and downloading?
Or using a different Emacs install?#2021-01-1113:28otwieraczNo, not really. Iāll try though. Thanks!#2021-01-1115:19practicalli-johnnyThose are the two suggestions I've seen to try solve a blinking Emacs.
Updating .ELC or packages is useful to try if you upgraded MacOSX after installing Spacemacs#2021-01-1422:32caumondHi @jr0cket, I've tried to change my setup, fresh install, remove packages, nothing change. I'm installing a brew version right now. Two things for you: 1) your https://practicalli.github.io/spacemacs/os-specific-config/macosx.html (which is great by the way) tells to run brew install -cask emacs which is not working anymore, the "-cask" is not working anymore. 2) I tried your .spacemacs.d folder, which is great also, but I didn't figure out how to setup the variables I used to use: (osx :variables osx-use-option-as-meta nil) . This option is needed for some non us keyboard, I cannot key tilde or brackets keys without that option.... šŖ. Thx in advance !#2021-01-1507:09practicalli-johnnyFor reference, the (osx :variables ,,,) line would be added to the dotspacemacs layer section, along side the other layers used (helm, elisp, Clojure, git, etc)#2021-01-1507:11practicalli-johnnyThe brew -cask approach was in the Spacemacs docs, so I'll check if it's been updated.
Thanks for raising this.#2021-01-1422:39caumondHmm, some magics happen there, my brew version of emacs seems to be already setup for my non us - mac os - keyboard. So, I don't need answer 2 anymore, only for curiosity.
brew tap railwaycat/emacsmacport
brew install emacs-mac
brew link emacs-mac
My first tries with the above version are positive. It seems to stop the flickering issue, even if I need more time to check: the issue was not completely reproductible, or at least I did not understand the conditions...#2021-01-1507:14practicalli-johnnyThank you for sharing, I'll add this as an approach to the book for Mac.#2021-01-1708:08caumondI used the same update on my imac and, after a while, I confirm I have no flickering any more with brew emacs-mac version.#2021-01-1616:57FarisHi, sorry Iām super new at using Spacemacs, trying out REPL Driven development, I just wanna ask, whats the difference between cider-ns-refresh and cider-ns-reload and cider-eval-buffer and when should use which?#2021-01-1617:58practicalli-johnny@hewrin Its a very good question.
Use cider-eval-buffer when you first start the REPL in cider (cider-jack-in or cider-connect), run this command with the main namespace file open in the current buffer. This will load all the code in that namespace, except commented code) and will load the all the Clojure core into Ciders memory (runtime state). This makes things like cider-doc work.
Also use cider-eval-buffer if you made changes to a number of functions or defs and want to evaluate all the changes. It will update any changes to functions and defs (but not defonce expressions)#2021-01-1618:00practicalli-johnnyTake a look at this page to understand more about refresh and reload (I dont really use them that much and sometimes its easier to restart the repl, but they can be useful)
https://practicalli.github.io/spacemacs/clojure-repl/refresh-restart-repl.html#2021-01-1618:54FarisThanks for the explanation @jr0cket!
Am I correct in assuming I need to run cider-eval-buffer every time I make a change in my file for it to be able to be evaluated by the REPL?#2021-01-1623:49practicalli-johnny@hewrin you should evaluate changes to the code if you want to use them in the repl. These are usually done on a specific expression
For example, if you change a function definition, defn expression, then you can just evaluate that defn expression using , e f
I usually evaluate an expression as soon as I have changed it, to make sure it does what I think it does.#2021-01-1623:53practicalli-johnnyIf you have changed a few different expression without evaluating them, then evaluating the buffer is a quick way to do so.#2021-01-1623:58practicalli-johnnyIf you have any code you don't want to call when evaluating the buffer, for example experimental code, I use the (comment ,,, ) expression. I can still go an evaluate those expressions in the repl individual#2021-01-1702:30FarisUnderstood, thanks for your help! š
Getting a bit lost in Emacs aside, I'm loving the Spacemacs experience so far!#2021-01-1710:22practicalli-johnny@hewrin there is much that can be learned about Spacemacs / Emacs / Cider and the REPL. If you can learn a few things every week you will get there.
If you can run a REPL and evaluate expressions from the source code buffer, you are well on your way#2021-01-1917:35grazfatherI find that i get stuck in insert mode a lot#2021-01-1917:35grazfatherescape acts as a prefix#2021-01-1917:36grazfatherhow do I leave insert mode if both esc and ctrl-[ don't work?#2021-01-1917:55grazfatheroh, I think it's from hitting Ctrl-z#2021-01-1917:56practicalli-johnny@grazfather ah, hitting C-z takes you to Emacs editing state, cursor turns blue. C-z will take you back again#2021-01-1918:15grazfatheryucky. I wouldn't know how to use it, but I apparently hit it accidentally. How can I unmap it?#2021-01-1918:23practicalli-johnny@grazfather to unmap the key should be something like this in the .spacemacs file, in the dotspacemacs/user-config section
(define-key global-map (kbd "C-z") nil)
#2021-01-1918:37grazfatherThank you!#2021-01-1918:38practicalli-johnnyI think SPC f e R should load in the change, otherwise SPC q r to restart Emacs.#2021-01-1918:39grazfatherHm, that doesn't seem to work.#2021-01-1918:40practicalli-johnnySorry, copy paste error, I forgot to change the k to a z... updated in the post above#2021-01-1918:41grazfatherno that wasn't it, i figured that part#2021-01-1918:41grazfatherI had to use global-map not global-state-map#2021-01-1918:41practicalli-johnnyIts probably defined in a different keyboard map#2021-01-1918:41grazfatherwait that doesnt' work either#2021-01-1918:42grazfatheryeah i will unmap it manually in all of them#2021-01-1918:43practicalli-johnnySPC h d K will describe a key map#2021-01-1918:45grazfatheroh wow ty#2021-01-2002:03grazfatheris there a way to force-expose some symbol in a layer to my .spacemacs so that I can configure it? Specifically i want to add bindings into lsp so that Ctrl-p and Ctrl-n move up and down the autocomplete choices#2021-01-2002:05grazfatherOn that same vein, how do I find out which mode is currently active? e.g. which map is at āthe topā e.g. when auto complete suggestions are being shown#2021-01-2317:14prncš Is there a way to get the āstar searchā (i.e. * a.k.a. shift+8) work on symbols containing > ? This is pretty idiomatic in clojure to have fom->to or ->FooBar kinds of things and that search does not work. Something about regexp escaping itās doing⦠Would appreciate if anyone has and advice how to work around it, cheers!#2021-01-2317:40practicalli-johnny@prnc I use helm-swoop and it seems to handle characters like this okay. If using * for the transient symbol highlight menu, then try s from that menu to find matches#2021-01-2317:44prncnice! thanks that is a nice workaround. Just need to dig a little deeper to try to see if I can get it to a more ātraditionalā i.e. vim like behaviour i.e. * works right away, triggering search forward or just highlight and n to get the next match. Muscle memory thing š Cheers!#2021-01-2318:14practicalli-johnny@prnc or SPC v and maybe a few more v to select the whole form and then * works.
Maybe its just a case of defining a word boundary for the function called by * :woman-shrugging:#2021-01-2400:03zane@prnc I believe evil-ex-search-word-forward is probably what you want? Doom has it bound to * by default. Not sure if Spacemacs uses the same function.#2021-01-2512:37johanmynhardtš© Please Halp. I'm a spacemacs newbie and I just started being confident as everything was stable between restarts. However since Saturday evening I had issues with a helm package not being available, and since then my system is haunted. For example: I installed magit this morning and now when I launched a 2nd window, it was removed. Am I just being silly or something? (magit was installed before and working fine between restarts, prior to Saturday)#2021-01-2512:42johanmynhardtOoh... think I found something:
https://www.reddit.com/r/emacs/comments/cgieh2/why_does_spacemacs_uninstall_magit_and_evilmagit/#2021-01-2517:32practicalli-johnny@johanmynhardt it sounds like you have been trying to use packages with Spacemacs. The principle way to install packages is through a layer, adding the layers you wish to use to the dotspacemacs-configuration-layers section of your .spacemacs file.
Take a look at this book for help getting started with Spacemacs and Clojure development
https://practicalli.github.io/spacemacs/#2021-01-2517:35practicalli-johnnyhttps://github.com/practicalli/spacemacs.d/blob/live/init.el is an example of a .spacemacs configuration file with many layers and a little custom configuration in dotspacemacs/user-config
Note: .spacemac.d/init.el is used if a .spacemacs file is not present. I prefer this approach as its easier to version my Spacemacs configuration#2021-01-2517:52johanmynhardtThank you @jr0cket I found my problem. I've installed magit manually because I wasn't aware of the layer flag for git, which already enables magit. Small steps learning š
Thank you for the wonderful documentation you are doing š#2021-01-2518:54practicalli-johnnyOnce you get used to the layers then Spacemacs becomes really easy for 99% of what most people need. There are a lot of layers to choose from
https://develop.spacemacs.org/layers/LAYERS.html
SPC h l will also show the list of layers available#2021-01-2602:18grazfatherDAE get āpackage cl deprecatedā all the time?#2021-01-2602:50grazfatherLooks like itās from core/libs/dash.el#2021-01-2708:37practicalli-johnnyEmacs 27 changed the male of cl and not all Emacs packages have updated to use the right name. Raising an issue with the upstream Emacs package would be the way to resolve this.#2021-01-2602:20grazfatherAnd another question, I guess: I try to use SPC k to barf and slurp, but it leaves me in ālispā mode after. Is there a way to have it return me to normal mode? or perhaps, are there good docs how to use lisp mode? whenver I try to slurp or barf i either have to remember to hit escape, or i mess up my code#2021-01-2602:44grazfatherFound part of the answer: https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#editing-lisp-code#2021-01-2702:25grazfatherHm, spacemacs also canāt copy and paste properly. I canāt even figure out what itās doing, it just⦠fucks up everything when you try to copy and paste with v and p#2021-01-2702:35zaneIs it possible that youāre still winding up in lisp state after some operations?#2021-01-2702:35grazfatherno, I made sure that I started in normal mode#2021-01-2703:29zaneDid you mean y instead of v?#2021-01-2703:35grazfatherI meant v for selecting#2021-01-2703:37grazfatherso I meant v, y, then p.#2021-01-2708:40practicalli-johnnyI would appreciate it if swear words were not used in this channel, no matter how frustrated you obviously are.#2021-01-2717:38FarisIt says here https://practicalli.github.io/spacemacs/clojure-repl/jack-in-to-repl.html that Spacemacs can start a REPL for the current Clojure project, calling out to the Clojure CLI tools (deps.edn), Leiningen (project.clj) or Boot (boot.build) based on which configuration file is found in the root of the project. Iām not sure how exactly to accomplish this. So far Iāve only managed to send one file at a time to the REPL, and if a file imports from another file, Iāll need to load that file manually as well.#2021-01-2808:58practicalli-johnny, ' calls sesman start and asks which type or repl to start.
When that has started, the , e menu has a number of commands to evaluate Clojure.
, e f to evaluate the whole of the current express under the cursor (from the most outer brackets).
https://practicalli.github.io/spacemacs/evaluating-clojure/#2021-01-2718:03clyfe> package evil-magit is unavailable
I get that after installing spacemacs develop with practicalli live#2021-01-2718:16clyfeNvm, my emacs version is 26, I'll try 27#2021-01-2721:14clyfeSo evil-magit moved to evil-collection, but why on earth remove it from melpa?#2021-01-2923:24bmaddyI'm thinking about trying to upgrade CIDER. However, the last time I did this I had major problems and couldn't get any code written for a while. I can't really afford to have that happen this time. Is there any way to easily guarantee that I can revert? Would it work to just make a copy of my .spacemacs and .emacs directories and replace them if things get messed up? Is there anything else I need to consider?#2021-01-3010:28jumarYeah, I think itās basically backing up the .emacs.d dir#2021-01-3014:21practicalli-johnnyNo need to backup, Spacemacs does that for you. There is a Rollback packages button on the home buffer, next to the update packages.#2021-01-3014:21practicalli-johnnyIf you can't afford any down time, I don't understand why you would spend time upgrading.#2021-01-3014:22practicalli-johnnyI've never had any issues with new cider versions in the last 3 years#2021-01-3019:31bmaddyThanks! I'll back those up just in case and try the spacemacs backup first if anything goes wrong.
I'd like to upgrade because the version I'm on doesn't seem to work with shadow-cljs (at least I couldn't figure it out). I want that because I'm trying to spike out something using fulcro and the demo app uses shadow, so it would be really nice to have the cljs repl working with that.
Also, I hope I didn't come off as griping about cider, spacemacs, or emacs. I actually love all of them--this is the best development environment I've ever had!
Thanks again for the help!#2021-01-3020:39practicalli-johnnyThere have been many questions in the cider channel about getting it shadow-cljs working.
Shadow-cljs does need a particular setup when using Cider jack-in. It is covered in the detailed shadow-cljs guide, but there is a lot in there
Personally I find it easier to start the REPL in a terminal and use cider connect instead.#2021-01-3020:48bmaddyYeah, I tried that but wasn't able to figure that out. š Honestly, that seems like a better path to me anyway if I could get it to work.
I just did the update. After crashing once and having nothing at all work, I manually did a git pull in .emacs.d and things seemed to work the second time. I'm not really sure if all my clojure stuff works yet. I'll have to spend more time on it tonight. I expected it to upgrade to cider 1.0, but it seems to have put me on 1.1.0snapshot. š¤·#2021-01-3020:54practicalli-johnnySpacemacs develop always uses the latest package of cider, which includes the snapshots in between major releases.
Those snapshots have not cause me a problem in the past. it is possible to add a bit of configuration to spacemacs to use a specific version of a package if required.
Example in this blog post
http://jr0cket.co.uk/2017/03/spacemacs-managing-broken-emacs-packages.html#2021-01-3103:00bmaddyWell, I updated the packages and some stuff broke. Then I saw the recommendation to use develop here https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html and switched to that (I've been itching to try the lsp layer for something like a year now). After a lengthy .spacemacs/init.el update, everything was horribly, horribly broken. Then I realized I was on emacs 25 and 27 is recommended. I upgraded that and things actually seem to be working! Yay! Thanks again for your help you two. @U05254DQM, these guides are spectacular!#2021-01-3016:01grazfatherthis is more of an emacs question, but related: How do I check the value of some var? I am setting it in my dotfiles, but it isnāt working. how so I ensure itās set? specifically I wanted to add ".clj-kondo" to projectile-globally-ignored-directories since itās making SPC p f needlessly busy#2021-01-3017:31shanit seems you can look up the variable with describe-variable command#2021-01-3017:31shanthe help window should come up with
Its value is
...
#2021-01-3017:57grazfatherThank you! It seems to be set correctly, it just doesnāt work correctly#2021-01-3017:58shanI think .gitignore is taken into account by projectile, so that's another option#2021-01-3018:18grazfatheryeah, but then i have to do that for every project, even playing around (where I donāt use git at all, maybe)#2021-01-3115:00shanI wonder if it's related to the issue stated here:
https://github.com/bbatsov/projectile/issues/1250#issuecomment-578547278#2021-02-0116:15grazfatherHm, maybe. I donāt really understand whatās going on there#2021-01-3016:02grazfatherI have (setq-default projectile-globally-ignored-directories ā(āvendorā ā.clj-kondoā)) set in my dotspacemacs/user-config#2021-01-3112:50Ho0manHi everyone,
How can I limit the SPC s p command in spacemacs to refrain from searching certain directories.
In front-end projects with shadow-cljs using SPC s p causes the editor to look for matches even in minified js files causing the editor to hang.
Thanks a lot in advance
I am using practicalli's default spacemacs config#2021-01-3112:53practicalli-johnnyProjectile should ignore patterns in the project .gitingnore file and I think / hope the users .gotignore-global file (if added).#2021-01-3112:54practicalli-johnnyThere is a projectile invalidate cache command somewhere, this should reload patterns from .gitignore.
Or try revert-buffer on the file you are initiating the search command from.#2021-01-3112:56practicalli-johnnyOr add a .projectile file in the root of the project with patterns to ignore, although I think this is really just where you want patterns that are not in . gitignore or are not using git#2021-01-3113:02Ho0manThat's exactly it.
Thanks a lot for your help, this was very helpful#2021-01-3114:57Ho0mansorry but it didn't work.
I searched quite a bit and the document mentions that .projectile file is ignored by alien indexing which apparently spacemacs has switched to on develop
but even after setting the indexing method to 'native the issue persists
Am I doing something wrong ?#2021-02-0219:10Alexis VincentHi there. Whats the correct way to add
(use-package doom-modeline
:ensure t
:init (doom-modeline-mode 1))
equivalent to spacemacs?
I popped the above into my user-config with doom-modeline also in spacemacs-additional-packages and it seems to reinstall doom-modeline every time#2021-02-0220:20Yehonathan SharvitIād like to learn to program in emacs. Any online material or book to recommend?#2021-02-0220:37practicalli-johnnyThere is an Emacs Lisp track on http://Exercism.io but havent tried it yet
https://exercism.io/tracks/emacs-lisp
Otherwise I'd probably start with the Emacs manual and reference guides
https://www.gnu.org/software/emacs/documentation.html#2021-02-0222:02Yehonathan SharvitThank you @U05254DQM.
The emacs-lisp track is only about the language itself. I am looking for something that teaches the editor related concepts (buffer, frame, point etc..) in a digestible way.
The Emacs manual is a bit too detailed and I get lost in the details.#2021-02-0313:51Yehonathan SharvitDo you know of material that teach the fundamentals of emacs programming?#2021-02-0315:42erwinrooijakkersDoes someone have any success installing lsp in spacemacs, is there a tutorial?#2021-02-0316:01grazfatheritās trivial#2021-02-0316:01grazfatherJust uncomment the lsp line in your dotspacemacs-configuration-layers and then reload it.#2021-02-0413:34erwinrooijakkerswow#2021-02-0316:02grazfatherSPC f e d to open you dotfiles and then SPC f e R to reload after youāve made your changes and saved#2021-02-0316:02grazfatheryouāll also need the layer for the language you want to work with, and maybe some cli tools installed#2021-02-0321:55practicalli-johnny@erwinrooijakkers it is simple to enable LSP in Spacemacs, by adding the LSP layer. This will automatically start an LSP process for all Clojure project you open.
Last time I checked, this blocks Emacs until every Clojure project is analysed. As LSP is on or of for all projects, this kills my workflow.
Then you will need to do some configuration of LSP UI if you wish to also run CIDER as well.
CIDER already provides many features that LSP provides, so you need to decide what to switch off in LSP to avoid those conflicts.
If your new to LSP, make sure you actually need it before spending time configuring it.#2021-02-0413:35erwinrooijakkersNo need to add clojure-backend in clojure layer?#2021-02-0413:35erwinrooijakkersin dotspacemacs/layers#2021-02-0423:27practicalli-johnnyThe Spacemacs maintainers decided that if you have the lsp layer enabled then clojure mode will use LSP by default.
I don't understand this decision, but my concerns were ignored.
The backend must be set to cider to avoid using LSP with Clojure#2021-02-0404:25bmaddyEvery time I paste something into my buffer, the entire file is auto-indented. Does anyone know how to turn that off? I haveĀ `aggressive-indent-mode`Ā , clean-aindent-mode, and electric-mode all turned off.#2021-02-0418:06Alexis Vincenttry lsp-enable-indentation#2021-02-0418:06Alexis Vincentand lsp-enable-on-type-formatting#2021-02-0418:06Alexis Vincentset both to nil#2021-02-0418:06Alexis VincentThat fixed things for me#2021-02-0420:37bmaddyomg thank you so much! I lost about 2.5 hours to figuring that out. Disabling lsp-enable-indentation did it for me!#2021-02-0416:02Yehonathan SharvitAny idea why every two days my Emacs (with spacemacs) GUI app takes 100% CPU of my Macbook Pro and become not responsive?
When it happens, I have no other choice that Force quitting Emacs š#2021-02-0416:03Yehonathan SharvitThanks God, my REPL runs from the terminal and not from Emacs#2021-02-0416:11caumondSame here. Which installation are you using ?#2021-02-0416:11caumondBoth on imac and mac book pro.#2021-02-0416:12caumondBoth on bigsure#2021-02-0416:13caumondEmacs-mac formulae of brew#2021-02-0416:22Yehonathan SharvitI am using https://emacsformacosx.com/#2021-02-0418:39caumondUnder bigsure this one was not stable at all for me, and it had some blinking issues also#2021-02-0420:58Yehonathan SharvitI am on Catalina#2021-02-0420:59Yehonathan SharvitIs there a better distribution for Macos?#2021-02-0421:01caumondI suggest you try alternatives according to https://github.com/syl20bnr/spacemacs/tree/develop#macos#2021-02-0421:02caumondFor myself the more stable was the brew version of emacs-mac#2021-02-0421:03caumondBut still buggy#2021-02-0421:50Yehonathan SharvitHow could it be that there is not stable emacs distribution on Mac ? @U05254DQM what do you think?#2021-02-0423:14practicalli-johnnyI used EmacsForMacOSX for version 26.x on what ever was the Mac OS between 2014-17.
I haven't had a Mac since then.#2021-02-0423:18practicalli-johnnyIf some process is running away, it's most likely a package or some compiled Emacs lisp, .elc file.
Suggest deleting the .emacs.d directory and starting Emacs, then Spacemacs will download fresh versions of the packages.
Also ensure that your .spacemacs file ((or .spacemacs.d/init.el) file is up to date with the template. SPC f e D will run a diff of your config against the template.#2021-02-0503:19Gleb PosobinYou can send a SIGUSR2 to emacs, it might stop what it's doing and print out a trace, but not guaranteed though if it is stuck in some C-code.#2021-02-0507:30caumond@U0L91U7A8, maybe I wasn't clear. I experience the same issues as you. A few weeks ago I had a blinking issues with the emacsformacosx version, and @U05254DQM found other people with the same issue. So I moved to the brew version. The first I tried recommended by spacemacs for macos lead me also to the same issue, emacs not responsive at all, until I kill the process. I didn't spend time to try to find out where it come from. The bug seems random to me. My spacemacs.d directory is a fork with small changes from the practicalli's one, quite standard. All that details to tell, there may be other solutions, maybe the other emacs brew version.#2021-02-0507:57Yehonathan SharvitThank you for the clarification#2021-02-0507:59Yehonathan SharvitI found a workaround for the case where the irresponsiness is caused by CIDER Repl buffer.
Run emacsclient to open a new emacs frame. Kill the REPL buffer#2021-02-0509:10caumondhmm, good, I'll check that next time#2021-02-0509:23caumondjust to check I understand well, your repl has been launched externally, in a terminal, and you kill only the cider session in emacs, through the buffer?#2021-02-0621:57Yehonathan Sharvitexactly#2021-02-0511:08mccraigmccraigso, frustrated by spac/emacs instability (generally poor performance, occasional crashes, and hangs on wide files and large repl output), i went as far as trying vscode for a couple of weeks, and it's not bad. it's certainly a lot more stable, and there are loads of good extensions. but CIDER is quite a lot better than calva, and pervasive helm is so much better than vscode's grab-bag of different UI for different nav tasks, and emacs windows and layouts are just great &c so i'm wondering - has anyone had any success with making spac/emacs (on macos) more stable ? e.g. are some versions better than others wrt crashing and wide files, are there any helpful tricks ?#2021-02-0518:52bmaddyThanks for the report on vscode. I was thinking about trying that out for similar reasons. I know a lot of the Clojure community is using intellij. I don't know if that's because it's really good or just people coming from java are familiar with it. Have you tried that one?#2021-02-0519:02mccraigmccraigi've used intellij for java plenty... it has great refactoring support, but i don't like it š#2021-02-0519:07mccraigmccraigi've gone back to spacemacs for now - the CIDER test loop is so much better i'm just more productive. i'm also trying a new emacs build - https://github.com/d12frosted/homebrew-emacs-plus from homebrew (i was previously on railwaycat) so we'll see how that goes#2021-02-0520:42bmaddyToo bad, I was hoping Cursive would be as good as cider.
fwiw, I haven't had too many performance issues with https://emacsformacosx.com/. Or, at least, I blame my performance issues on the number of web browser tabs I have open. š#2021-02-0522:13practicalli-johnnyCursive seems relevant if you have a deep knowledge of using IntellJ and mostly code by static analysis of code rather than REPL.
I have met quite a few developers using Cursive that never used the REPL.
Calva is focusing a lot more on static analysis as it's building on LSP. I wonder if the repl will be used less with Calva too.
I haven't found anything better than Cider for doing REPL driven development, although Conjure plugin for NeoVim is very good. So apparently is vim-iced.#2021-02-0522:37mccraigmccraigi haven't tried to use cursive @U067Q76EP, so i can't comment on it - i'm pretty clear i don't want to use intellij, so i've not bothered with it. others may feel differently ofc#2021-02-0522:38mccraigmccraigi'm generallly very happy with CIDER's functionality - it's just emacs instability that winds me up sometimes#2021-02-0522:42mccraigmccraigcalva does use lsp, but lots of stuff still seems to require a repl @U05254DQM . its repl is ok, and code navigation through definitions and references etc is really nice. i tried to use it for a test driven workflow though, and the test runner feedback is quite deficient compared to CIDER's#2021-02-0522:44mccraigmccraigi might give conjure and vim-iced a spin... i've never really tried serious editing with vim, but stuff like this makes me want to try it out : https://takac.github.io/2013/01/30/vim-grammar/#2021-02-0600:03grazfatherlet us know what you think about vim iced. I somehow only learned about it today (reading the babashka book). I had been using vim-fireplace.
Cider is certainly much better for repl integration#2021-02-0615:49prncIāve seen reports of DOOM Emacs being better in those areas, havenāt tried myself#2021-02-0707:43emilaasaConjure and neovim works well on a tortured macbook pro at the moment.#2021-02-0707:44emilaasaI haven't played around with lsp too much yet, we'll see what happens in a large codebase with lsp.#2021-02-0707:45emilaasaThe primary reason I use neovim instead of spacemacs or cursive is the performance which is great.#2021-02-0919:21Yehonathan SharvitHow could it be that Emacs is not stable?#2021-02-0919:24practicalli-johnnyFor me, Emacs has stable on Linux for the last decade. Even running nightly builds of Emacs 28 last year was stable for the few months I used them.
I wonder if it's some other factor?#2021-02-0919:31Yehonathan SharvitIsn't it supposed to be one of the most stable editor out there?#2021-02-0919:36practicalli-johnnyEmacs has been stable on Linux for me for the last decade, not sure how much more stable you are looking for. Most likely causes of instability are packages or the distribution of Emacs used conflicting with changes to an operating system. Its not that surprising to see issues with those running the new hardware and software for MacOSX, as thats a really big change.
As MacOSX is a commercial operating system, its probably not surprising that less testing gets done upon it. This could be a source of issues.#2021-02-0920:09mccraigmccraig@U0L91U7A8 :man-shrugging: i was having hard crashes every week or so, not sure why. performance is awful when a repl dumps a load of stuff, leading to pauses and sometimes crashes, and wide lines also lead to very poor performance#2021-02-0920:10mccraigmccraigI'm trying a different build now... i was on railwaycats, now trying brew/emacs+ ... will see if that's any better#2021-02-0920:13Yehonathan Sharvit@U05254DQM is there a way to limit the size of the REPL buffer size?#2021-02-0920:14practicalli-johnnycider-repl-buffer-size-limit with an integer value will limit the repl output. 1000 should be okay. I have it set to 100 as I dont use the REPL buffer in Cider directly
It can either be a setq in dotspacemacs/user-config or add it as a clojure layer variable
(clojure :variables
clojure-backend 'cider
clojure-enable-linters 'clj-kondo
clojure-toplevel-inside-comment-form t
cider-overlays-use-font-lock t
cider-repl-buffer-size-limit 100)
#2021-02-0920:22practicalli-johnnyAvoid sending logs to the REPL buffer, especially if the logs generate proper log objects or very long strings... It wont take many lines of those to start to slow down Emacs.#2021-02-1006:40Yehonathan Sharvit1. cider-repl-buffer-size-limit doesnāt work
2. How do we avoid sending logs to the REPL buffer?#2021-02-1109:10practicalli-johnnyThere is a suggestion in #emacs as to stable versions to use on MacOSX
https://clojurians.slack.com/archives/C099W16KZ/p1613009517053300#2021-02-1109:17mccraigmccraigthanks @U05254DQM - i've been using the brew/emacs+ bottled version for the past few days, and haven't had any crashes yet#2021-02-0518:49grazfatherI am with you. I like emacs but the hangs, crashes, and general slowness are hard to deal with. I still find if i need to get something edited quickly itās a lot nicer just using Vim#2021-02-0919:31Yehonathan SharvitIsn't it supposed to be one of the most stable editor out there?#2021-02-0616:24jumarHow can I open a "link" (e.g. to a file) in other window?
Most of the buffers use <Enter> to open the file under the cursor but that opens the file in the same buffer.
I'd like to have something like jump-to-definition-other-window but when I go through results.
One example is "search project" -> ... -> F3 (to open the results in a buffer) -> opening some of the files found in other windowe#2021-02-0616:25jumar"Preview" (without switching to the other buffer) would be cool too - like it works with TAB when searching interactively#2021-02-0619:18grazfatherDoes anyone have a good guide for lisp mode? maybe a video. Other than basic slurping and barfing, I donāt know what a lot of these do, and without them explained, just trying them they seem ārandomā#2021-02-0701:24nmkiphttps://youtu.be/fYsqaAL8HSU?t=740#2021-02-0815:14erwinrooijakkersThis is my favourite (3 minutes): https://youtu.be/D6h5dFyyUX0
Explains selection of paredit moves (wrap, slurp, barf, raise, splice, convolute, kill, split, join). The equivalent commands in Spacemacs are bound to SPC k.#2021-02-0817:40grazfatherThank you both#2021-02-0820:12zaneMany of the operations in lisp state are from Paredit, so this might be useful: http://danmidwood.com/content/2014/11/21/animated-paredit.html#2021-02-0919:51practicalli-johnnyI tried clojure-lsp for Clojure today. I downloaded the latest clojure-lsp binary and restarted Spacemacs after updating packages and code, just to make sure everything was up to date.
I was sad to see that it broke lots of things that I use regularly
⢠typing code - I couldnt type spaces in a clojure expression as something was removing the space. If I continued typing without a space then it some how fixed itself
⢠find vars broke - without lsp I can jump to a function definition from its symbol name. enabling lsp, this broke and the other tools lsp provided did not work. This aspect was most disappointing as its one of the reasons to consider using lsp.
⢠snippets stopped working - I have about 10 snippets I regularly use and they all stopped working
⢠Very noisy emacs-lsp UI
⦠displays a breadcrum trail at the top of each buffer, showing the full path of the file
⦠highlights a current symbol, unfortunately using a really bad contrast with the doom theme I run. This makes it harder to see what I am selecting.
⦠popup window giving me names and doc strings of functions almost instantaneously. I had to scale down my default font size as these were too big.
After removing the lsp layer and restarting Spacemacs, everything was back to normal again though.
I assume this is all due to the conflict between Cider and LSP and can probably be configured away given time and knowing what options to switch off. Given that lsp is the default for Clojrue if the lsp layer is enabled, I would have expected a better default configuration.
Being able to type spaces in the code would certainly be a bonus š
Hope you have better luck if trying / using clojure-lsp#2021-02-1001:03grazfatherWhy does spacemacs use ctrl k and j for up and down? even in vim itās ctrl p and n normally#2021-02-1009:08practicalli-johnnyIn Spacemacs j and k move the cursor down and up a line on Evil normal state, just like the vim style. 24 j will move down 24 lines just like vim.
If this isn't the case, then some custom code has been added or something is broken.
C-j and C-k are used to navigate in a helm popup, but I cannot think of another case.#2021-02-1014:43grazfatheritās also used in the repl#2021-02-1014:43grazfatherjk and makes sense, but in vim ctrl p and ctrl n are used to navigate dropdowns and history#2021-02-1014:44grazfatherI guess fixing it in Helm would have the biggest impact#2021-02-1503:11grazfatherHow can I configure projectile to ignore the clj-kondo cache? SPC p f is so cluttered otherwise#2021-02-1509:34practicalli-johnnySuggest adding the clj-kondo cache directory to your git global ignore file#2021-02-1615:04grazfatherthanks#2021-02-1614:59ivarif I see WARNING: CIDER 1.1.0-snapshot requires cider-nrepl 0.25.9, but you're currently using cider-nrepl 0.21.1. The version mismatch might break some functionality! have I done something wrong, or did I catch my spacemacs dependenies in a weird state when I updated my packages? (I just refreshed develop and updated all my packages)#2021-02-1615:11ivarhmm.. following up, I tried using the practicalli spacemacs config and it has the same error.#2021-02-1616:52ivarugh. I'm still new to this. I found the old version of cider-nrepl was specified in the project.clj#2021-02-1707:51practicalli-johnnyIf you are using cider-jack-in to start the REPL, remove the cider-nrepl dependency from the project.clj.
If using cider-connect then update the version of cider-nrepl in project.clj to match the version of Cider#2021-02-1622:52ivarAnother newb question - how do I load environment variables into my repl ? I've got direnv setup in my shell, and a .envrc file at the root of my clojure project, but I'm stumped as to how to provide the env vars to the repl process. Any pointers appreciated.#2021-02-1707:56practicalli-johnny(System/getenv "PORT")
This will read the value of the PORT environment variable#2021-02-1708:12practicalli-johnnyIf you add an environment variable to you operating system with Emacs already running, you will need to restart before Emacs picks it up.
If you are using Spacemacs develop them add the environment variable to spacemacs.env SPC f e e
Then reload spacemacs.env (which I think is SPC f e E )#2021-02-1715:56ivaroooh. Interesting#2021-02-1716:05ivarMy use case is that I want the jvm started with cider-jack-in to have certain environment vars.
For my shell I use direnv but I'm not sure what's the best way (or frankly any way) to get this to work in spacemacs. I see there's at least a couple of existing emacs plugins (https://github.com/purcell/envrc and https://github.com/wbolster/emacs-direnv) but I'm not comfortable enough with spacemacs (or emacs) to try creating my own layer. Am I missing existing functionality in spacemacs on how to use these env vars ?
is it possible to set environment variables with .dir-locals.el that would be exposed to a repl process?#2021-02-1716:06ivarin the short term, I guess I can swap out different versions of spacemacs.envand restart emacs when switching projects.. I didn't know about spacemacs.env - thank you!#2021-02-1717:42practicalli-johnnyI would probably create a spacemacs.env file for each set of environment variables, naming them something like spacemacs.env.appone, spacemacs.env.apptwo and create a symbolic link called spacemacs.env that links to which ever file has the ones I need. When changing apps, I'd recreate the symbolic link to point to the other file and run SPC f e E to load it.#2021-02-1717:54ivarthat seems viable, and is a step better than what I've got going.. thank you for your advice#2021-02-1801:09practicalli-johnnyI was having an issue with the markdown mode missing most of the key bindings for a week or so. A further package update today downloaded a new version of the markdown package and the key bindings have come back. Package version markdown-mode-20210216.852 is working.#2021-02-1917:59practicalli-johnnyI hope to take another look at Clojure LSP with Spacemacs at the weekend.
I have a basic configuration but have a few challenges to solve, especially auto-formatting and aligning arguments and forms. I have switched off some of the cljfmt rules.
LSP does seem to change some of the key bindings too, so a bit of a learning curve there.
I am not sure how much benefit I will eventually get from LSP, but its an interesting journey.#2021-02-2005:25jumarI would be very interested to hear more details later and have "bulletproof guide how to use LSP in Spacemacs" if that's possible š#2021-02-2014:31lreadLassooing in @UKFSJSM38 - heāll likely have tips and guidance for your adventure!#2021-02-2014:36ericdalloGood to hear @U05254DQM š
This could help you: https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/
I'm doom-emacs user not a spaceemacs user, but I heard that there is no way to use lsp and cider together in spaceemacs because of its config, it'd be nice to confirm that or fix that on spaceemacs side š#2021-02-2018:12practicalli-johnny@UKFSJSM38 Thanks. I am using Spacemacs which does have LSP for Clojure (added in November 2020). LSP is the default backend for Clojure in Spacemacs if the lsp layer is added.
https://github.com/syl20bnr/spacemacs/commit/6d39cd5548768bed63cc18d51b74efb78f39963d
There are certainly conflicts with the additional configuration I use for my Clojure setup. This was due to aggressive-intend which I had hooked into clojure-mode. This conflicts with the cljfmt that LSP continually runs. As I've been using my setup for several years, I have disabled cljfmt until I can configure it to give the same results. Even without the conflict with aggressive-indent, I would have disabled some of the rules of cljfmt as they dont provide the readability I need for my code.#2021-02-2018:19practicalli-johnnyThe biggest challege is finding the parts of lsp that I find useful. This seems mostly in the configuration of the lsp UI and the automatic formatting (I like to align forms).
Having not used an IDE for most of the last decade I have enjoyed clutter free editing. I do find the default UI configuration very noisy and am spending some time surfacing just those parts of the lsp ui that give the most value.
The biggest challenge with using clojure-lsp with CIder is deciding which tool is going to do what. There is a lot of cross-over in functionality, so hope to create an lsp config that complements the features of Cider without over-riding features I have relied on for a long time.
Where there are improvements on the Cider features from LSP, then I would use LSP. It just takes a bit of time to understand what those parts are.#2021-02-2018:23practicalli-johnny@U06BE1L6T I think LSP is pretty reliable, I havent experience any issues recently. I think it really comes down to knowing what you want (and do not want) to experience with LSP (and CIDER). Much of the journey for me is trying to understand what the features of LSP are and how they can be helpful.#2021-02-2018:24ericdalloExactly @U05254DQM, I use LSP for almost every feature and Cider for runing tests/eval things#2021-02-2018:25ericdalloI stopped using clj-refactor as it turns out that LSP replaced the features that I used#2021-02-2018:26ericdalloAbout align-forms, There is a open feature request for that on cljfmt so the recommended way to do that is still using clojure-align from clojure-mode (I use that too š
)#2021-02-2018:27ericdalloI agree lsp-ui is noisy, we from lsp-mode are thinking in ways to improve that too, with better defaults maybe#2021-02-2019:02practicalli-johnnyHappy to share my minimal defaults when I figure them out. Could be useful to have 2-3 example configs, one very minimal, one with everything and one with the most common - if that is known.#2021-02-2019:25practicalli-johnnyI agree that clj-refactor should not be used (or needed) if using LSP. I stopped using clj-refactor a while ago though.
Clojure-mode has a few useful refactorings. I use helm-ag and iedit to refactor across projects, although this is a candidate for LSP instead, to reduce the steps required.
clj-refactor hotloading of libraries was a very useful feature, although I believe its still broken. However, its easy to do hotloading with add-libs if using Clojure CLI tools.#2021-02-2019:26ericdalloYes! Just FYI, we added support for a nice iedit integration too on lsp-mode: https://emacs-lsp.github.io/lsp-mode/page/integration/iedit/
It merge the power of iedit with LSP š#2021-02-2313:50Yehonathan SharvitLooking forward to read your guidelines about lsp+cider on spacemacs @jr0cket#2021-02-2314:09practicalli-johnny@viebel Its slow going... My advice for using LSP is to switch almost everything off in the UI unless you know exactly what you want.
Its not a guide, but this is what I am working on so far
https://gist.github.com/jr0cket/af47ebb02fb8cf808153b51ba412f4a3
I've also disabled clmfmt for now, until I can make it do what Cider already does
https://gist.github.com/jr0cket/aecd45258b52b2e12b8dbfc94c5f4bd7#2021-02-2314:11ericdalloThe lsp-ui is a extension package, you can just don't enable it at all š#2021-02-2314:11ericdalloMaybe speaceemacs enable it by default?#2021-02-2314:22practicalli-johnnyThere is a variable that can be set to switch lsp-ui off, although there is one thing I do like from it š#2021-02-2400:36practicalli-johnnyA very rough page on defining an uncluttered clojure-lsp configuration, keeping most of the work done by clojure-mode and cider. There are probably many improvements to make here, so any feedback is most welcome
https://practicalli.github.io/spacemacs/install-spacemacs/clojure-lsp/configure-lsp-and-cider.html#2021-02-2402:13grazfatherwhere would you like suggestions/typos/corrections?#2021-02-2402:14grazfatherTwo typos here: SPC SPC allt-the-icons-instal-fonts#2021-02-2402:14grazfatherTypo āpredominatlyā#2021-02-2402:14grazfathertypo āas its a more establishedā (itās)#2021-02-2402:15grazfathertypo āfilen nameā (filename)#2021-02-2402:15grazfathertype āCommended variablesā (commented)#2021-02-2402:16grazfathertypo ātext as right-hand side of bufferā (at)#2021-02-2402:16grazfathertypo āassume their maybe other lenses in futureā (theyāre)#2021-02-2402:17grazfatherThanks for writing that!#2021-02-2407:34spfeifferI did PRs on Github in the past that @U05254DQM happily merged.#2021-02-2409:06practicalli-johnnyThis is good, thanks.
I did say it was a very rough page š
I'll fix up the writing by the weekend.
Incorrect words usually mean I haven't written the sentence or paragraph properly, so usually rewrite#2021-02-2415:39grazfatheryep, I donāt expect perfection, just thought Iād share them since I usually have a sharp eye for typos AND it makes me read it more closely#2021-02-2417:35practicalli-johnnyYes, very useful thanks.#2021-02-2422:30practicalli-johnnyI'm just publishing a new version of the Spacemacs book with the fixes highlighted, thank you.#2021-02-2616:59mafcocincoHas anyone installed spacemacs as part of a docker image for doing development within a container? If so, does anyone know of a tutorial/walk through that talks about the steps required to set this up? In addition to the initial construction of the docker image, something specific I am curious about is the possibility of retaining customizations made by individual developers, possibly by storing this on a separate volume. Any assistance would be greatly appreciated. Thanks!#2021-02-2622:14practicalli-johnnyhttps://develop.spacemacs.org/layers/+distributions/spacemacs-docker/README.html#2021-02-2701:12zaneI would imagine that it would be easier to have developers run Emacs on the host machine + connect to a running REPL within the container. :thinking_face:#2021-03-0117:11mafcocincoThat is not a bad idea. In this case, at my current company, we are trying to build a docker image for developers to ease onboarding. Instead of having to install all the necessary dependencies, we could just have them just install what was necessary to run the container and (hopefully) everything they need could be self-contained within the container.#2021-03-0117:11mafcocincoBut we can play around with exposing the REPL from the container and see if that might be an option.#2021-03-0117:26mafcocincoThanks for the suggestions!#2021-02-2716:49grazfatherHow can I kill something i sent to the repl that run infinitely?#2021-02-2719:42practicalli-johnnyThere is cider-interupt which is bound to , e i
It should stop most things.
Alternatively, kill the repl buffer (assuming you used cider-jack-in to start the REPL)#2021-02-2719:44practicalli-johnnyIf Emacs is unresponsive, then kill the Java process for the repl, using a system monitor for your OS, or top on Linix machines#2021-02-2814:37grazfatherYeah, I restarted the repl, but it was annoying. Will try , e i next time. ty#2021-02-2720:50Westcross-post#2021-03-0502:27Patrick FarwickIs there a good place to get all of the packages installed with spacemacs?#2021-03-0506:28practicalli-johnnyAll the packages Spacemacs installs are in the .emacs.d/elpa directory#2021-03-1014:26grazfatherHow do I find what might be mapped to some key combo? and how do I see if itās mapped into certain modes?#2021-03-1014:39grazfatherHm, SPC h d b, but unfortunately itās a lot to sift through#2021-03-1014:52grazfather(Spacemacs) Error in dotspacemacs/user-config: Symbol's value as variable is void: helm-map
So I have a few problems. I donāt understand the above error. Whatās wrong with this?#2021-03-1014:52grazfather(setq-default hybrid-style-enable-hjkl-bindings t)
(define-key helm-map (kbd "C-n") 'helm-next-line)
(define-key helm-map (kbd "C-p") 'helm-previous-line)
; C-n and C-p to quickly move between open buffers
(unbind-key (kbd "C-n") evil-mc-key-map)
(global-set-key (kbd "C-n") 'next-buffer)
(unbind-key (kbd "C-p") evil-mc-key-map)
(global-set-key (kbd "C-p") 'previous-buffer)
#2021-03-1014:53grazfatherI get an error for the help part I donāt understand, and after unbinding the evil-mc binding, thereās another one under it. How do I unbind everything from that key? or do I just have to keep chasing it down. ideally Iād like to overwrite that binding on everythign and then reapply the bindings I want#2021-03-1114:55Gleb PosobinI think SPC h k shows you what is bound to the given key.#2021-03-1115:16grazfatherSPC h d k does, but itās still a bunch of chasing since you have to unmap that key, restart, then see whatās ānext in lineā, or mapped behind it#2021-03-1115:16grazfatherI want to basically unmap it entirely#2021-03-1117:20shan@grazfather Have tried helm-descbinds ? This does seem to show the bindings in the current modes you're in#2021-03-1117:24grazfatherOh, no, thank you, thatās very helpful @shan. Slightly on topic: HOw can I get helm to match literally? if I type c-n it matches thinks like SPc C-v n#2021-03-1117:28shanwrapping in "" seems to workĀ `"C-n"`#2021-03-1117:41grazfatherOh, thank you. In fzf I think preceding with a ' works. I had tried that. You have to close the quotes here, too.#2021-03-1119:18Kira McLeanHello! Sometimes with spacemacs my repl slows waaaayyyyy down.. like taking minutes to figure out (+ 1 1). I suspect my spacemacs config because I donāt seem to have the same issue with a fresh spacemacs setup. Iām wondering if anyone has tips for debugging. I donāt really know where to start looking for the problem other than brute force.. just deleting half my config at a time.. are there any tools available to try to narrow down what might be causing the extreme slowness?#2021-03-1119:23practicalli-johnnyThere are some general tips and links towards the bottom of this page
https://practicalli.github.io/spacemacs/install-spacemacs/troubleshooting.html#2021-03-1119:24Kira McLeancool, thanks!#2021-03-1119:24grazfatherLess practical, but this might help as well: https://www.murilopereira.com/a-rabbit-hole-full-of-lisp/#2021-03-1119:25Kira McLeanso far Iāve just been restarting everything when it happens and hoping it doesnāt happen again :face_palm: of course it always does. I really do want to get to the bottom of it but also Iād rather be writing code!#2021-03-1119:25Kira McLeanlooks interesting, thank you. Iāll check that out.#2021-03-1119:29grazfatherFunny story: I went to test out SPC a p from practicalliās link and I noticed that my Emacs was in a hard hang š#2021-03-1119:31practicalli-johnnyIf the repl buffer is getting quite large, try setting a size limit in .spacemacs layer configuration
(clojure :variables
cider-repl-buffer-size-limit 100)
100 is quite an extreme number, try 1000 if you want to see some history.#2021-03-1119:33practicalli-johnnyAvoid evaluating code directly in the REPL buffer and use source code buffers instead.
Avoid writing logs to the REPL buffer.#2021-03-1119:34practicalli-johnnyUse cider-inspect to view any data more than 100 characters. Its an amazing tool and you can page through large data sets or deeply nested data without killing Emacs
https://practicalli.github.io/spacemacs/evaluating-clojure/inspect.html#2021-03-1119:39grazfatherWhy would putting a few thousand lines in the repl slow down emacs?#2021-03-1119:39practicalli-johnnyOther general steps you could try:
⢠close any really big files
⢠remove any layers you are not using
⢠run Spacemacs develop branch
⢠use SPC f e D to check nothing is missing from your .spacemacs configuration
⢠run Emacs 26.3 or 27.x (if on a Mac, try a few different builds of Emacs)
⢠try delete .emacs.d/elpa packages content and restart spacemacs to download and compile packages
⢠avoid using lots of layouts / workspaces (although this only seems to affect startup time)#2021-03-1119:41practicalli-johnny@grazfather you can slow down Emacs with a single line if its long enough and Emacs is trying to font lock it... and the default bi-directional processing is enabled in Emacs.
font locking is very expensive in relative processing terms in emacs#2021-03-1119:43practicalli-johnnyThat reminds me of some other general optomisations that can be made to emacs, assuming you use left-to-right languages
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Emacs text rendering optimizations
;;
;; Only render text left to right
(setq-default bidi-paragraph-direction 'left-to-right)
;; Disable Bidirectional Parentheses Algorithm
(if (version<= "27.1" emacs-version)
(setq bidi-inhibit-bpa t))
;; Files with known long lines
;; SPC f l to open files literally to disable most text processing
;; So long mode when Emacs thinks a file would affect performance
(if (version<= "27.1" emacs-version)
(global-so-long-mode 1))
;; End of: Emacs text rendering optimizations
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
I assume this can be changed for right to left by changing the value#2021-03-1123:46shanIāve had spacemacs slowing down when Iāve had large output displayed in the repl. In which case cider-repl-clear-buffer helped.#2021-03-1204:06Yehonathan SharvitHow could we avoid writing logs to the REPL buffer?#2021-03-1209:06practicalli-johnnyExplicitly write them elsewhere...
Mulog is an excellent logging project
https://github.com/BrunoBonacci/mulog#2021-03-1209:30Yehonathan SharvitThat seems too much of an integration effort.#2021-03-1209:30Yehonathan SharvitIsnāt a simple way inside CIDER to avoid printing the log to the REPL buffer?#2021-03-1209:31Yehonathan Sharvitor at least tell emacs not to do any font locks to the REPL buffer#2021-03-1209:50practicalli-johnnyUp to you. I wouldn't generate logs if I wasn't going to use them properly#2021-03-1210:00Yehonathan SharvitI need the logs on my screen#2021-03-1204:06Yehonathan SharvitHow could we avoid writing logs to the REPL buffer?#2021-03-1211:24zendevil.ethI have a flycheck-clj-kondo question posted in #clj-kondo#2021-03-1211:25zendevil.ethbut Iām not seeing the flycheck-clj-kondo listed in melpa packages#2021-03-1211:39shanI think you shouldn't be using the package-install in spacemacs.
For clj-kondo, I've set this up in the .spacemacs file:
⢠SPC f e d
⢠in dotspacemacs-configuration-layers
(clojure :variables
clojure-backend 'cider
clojure-toplevel-inside-comment-form t
clojure-enable-clj-refactor t
clojure-enable-linters 'clj-kondo)
#2021-03-1211:39shanyou might also need the syntax-checking layer, but I can't remember#2021-03-1217:03practicalli-johnny@ps
If you have LSP enabled for Clojure, then you do not need to add clj-kondo, lsp will already provide that.
If not using LSP, then yes as Shan says, add clj-kondo to the clojure layer using clojure-enable-linters 'clj-kondo,
You will need the clj-kondo binary installed on the operating system executable path which is recognised by Emacs, check with SPC f e e and see the value of PATH
Spacemacs develop branch is required
As is the syntax-checking layer#2021-03-1217:04practicalli-johnnyAny packages installed with package-install will be removed by Spacemacs the next time Emacs is restarted.
There are a great many layers available with Spacemacs, removing the need to install packages directly
https://develop.spacemacs.org/layers/LAYERS.html#2021-03-1306:16zendevil.ethi have this in spacemacs-configuration-layers:
(lsp :variables lsp-lens-enable t)#2021-03-1306:16zendevil.ethI restarted spacemacs#2021-03-1306:16zendevil.ethbut I donāt think itās working#2021-03-1309:02practicalli-johnny@ps what do you expect that lsp configuration variable to do? What is not working?
Is this still about the clj-kondo linting?
You may wish to share a link to your .spacemacs config file (i.e. a GitHub gist or paste in, etc)#2021-03-1407:00zendevil.eth@jr0cket you mentioned that adding the lsp layer would automatically add clj-kondo. Thatās why I added the
(lsp :variables lsp-lens-enable t)
in spacemacs configuration layers. However, I donāt think the linting is happening. Hereās my .spacemacs file:#2021-03-1407:02zendevil.eth#2021-03-1411:13practicalli-johnny@ps
The lens variable only shows how many places a function is called. It's not connected to linting.
If you type (defn [] ) it should underscore that text and when you move the cursor over the underscored text then the error message shows.#2021-03-1411:15zendevil.eth@jr0cket I do not see the underscore nor the message#2021-03-1411:16practicalli-johnnyYour .spacemacs config has LSP, Clojure layer config to add clj-kondo and additional packages that adds flycheck-clj. This is a lot of duplication, so you should remove most of that config#2021-03-1411:18practicalli-johnnyIf you do not use LSP already, then remove it. LSP does require quite a lot of additional configuration, especially if you are used to the way Cider works#2021-03-1411:22zendevil.ethI had the :variables
clojure-enable-linters āclj-kondo even before I added (lsp :variables lsp-lens-enable t), but clj-kondo wasnāt working#2021-03-1411:22practicalli-johnnyIf you are using LSP, you can either disable it for Clojure or remove this Clojure configuration variable clojure-enable-linters 'clj-kondo and the additional-packages packages#2021-03-1411:23practicalli-johnnyIt seems you are using LSP for python. Do you want to use LSP for Clojure?#2021-03-1411:23zendevil.ethokay I removed (lsp :variables lsp-lens-enable t), and Iām back to where I was before#2021-03-1411:23zendevil.ethI donāt know what lsp is or does#2021-03-1411:25practicalli-johnnyIf you dont know what LSP does, then I'll assume you dont need it for Clojure. This simplifies things#2021-03-1411:26practicalli-johnnyPlease confirm you are using Spacemacs develop branch. On the Spacemacs home buffer, SPC b h in the top right corner is should have a version number, `http://0.300.xxx where xxx is the version of emacs you are using.
If this version is 0.200 then clj-kondo will not work, but I can show you how to upgrade#2021-03-1411:28zendevil.ethyes itās http://0.200.xxx#2021-03-1411:28zendevil.ethhow do I upgrade it?#2021-03-1411:29practicalli-johnnyThere is a full guide to upgrading here
https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html#2021-03-1411:31practicalli-johnnyIt is recommended that you use Emacs version 26.3 or 27.x (any version of 27)#2021-03-1411:32practicalli-johnnyYou can either update your existing configuration, or take a backup of your .spacemacs config and start from scratch#2021-03-1411:33practicalli-johnnyThere are a few steps that should be done, but they only need to be done once. Feel free to ask any questions if its not obvious.#2021-03-1411:49zendevil.eth@jr0cket thanks. I was able to upgrade and now clj-kondo works!#2021-03-1412:00practicalli-johnnyNow you are on Spacemacs 0.300, then updating Spacemacs is via Git. I use Magit.
There is a guide to updating here https://practicalli.github.io/spacemacs/install-spacemacs/update.html
Suggest only updating Spacemacs if you know there is a feature you need or a bug fix.
Updating packages is the same as version 0.200#2021-03-1412:01practicalli-johnnyYou may find a few new keybindings or some slight changes to key bindings, as you have just added over 2 years of updates to Spacemacs#2021-03-2114:51zendevil.ethIām encountering a problem in running a program by starting the clj repl in the spacemacs shell that works in the regular shell#2021-03-2114:51zendevil.ethIām running this repo:
https://github.com/Datomic/ion-starter
I start with clj and then start entering commands from this file:
https://github.com/Datomic/ion-starter/blob/master/siderail/tutorial.repl
When I reach line 9:
(starter/ensure-sample-dataset)
even though the the repl in the terminal works fine, the repl in spacemacs gives the following error:
Execution error (ExceptionInfo) at datomic.client.api.async/ares (async.clj:58).
profile file cannot be null
It seems like it has something to do with spacemacs being unable to source credentials from the ~/.aws/credentials file. I have relaxed the permissions to this file to chmod 777 but still get this error.
How can I fix this?#2021-03-2116:25practicalli-johnny@ps I don't recommend using the Emacs shell buffer for long running processes.
There are several shells you can run in Emacs. Try running either multi-term or vterm#2021-03-2116:29zendevil.eth@jr0cket doesnāt multi-term accept āpasteā?#2021-03-2116:29zendevil.ethtrying to paste something it says āBuffer is read-onlyā#2021-03-2116:32zendevil.eth@jr0cket ah it uses term-paste . In any case, Iām getting the same error. Profile file cannot be null#2021-03-2117:29practicalli-johnnyIt might be how you start Emacs. Try run Emacs from a terminal (rather than a desktop launcher) so it uses the normal shell environment#2021-03-2117:38zendevil.eth@jr0cket I always run it from the terminal with sudo emacs#2021-03-2118:23practicalli-johnnyWhy use sudo? Isn't that going to change the home path? What environment variables is it going to use, the users or root?
I assume you are using Spacemacs develop branch, so SPC f e e will show the environment Emacs is using#2021-03-2118:57zendevil.eth@jr0cket the HOME env variable is the userās home directory as it should be on sudo emacs#2021-03-2119:04zendevil.eth@jr0cket actually launching with emacs worked, which puzzles me because the HOME env var is the same in both cases#2021-03-2119:17practicalli-johnnyI've never needed to use sudo to start Emacs, so unclear of your use case. Spacemacs can open root owned files using SPC f E (sudo-edit).#2021-03-2500:07didibusAny idea how I like turn off lsp for Clojure buffers?#2021-03-2508:37practicalli-johnny@didibus set the backend to Cider disables LSP for all Clojure buffers. I assume a restart of Emacs is required if LSP is already running in code buffers.
(clojure :variables clojure-backend 'cider)
#2021-03-2702:42Huahaicider-doc does not in my spamacs#2021-03-2702:43Huahaiany idea? it stopped working since i updated the packages#2021-03-2702:43Huahaicider-doc does nothing now#2021-03-2703:26Huahaiok, this seems to only fail on emacs native comp, guess cider is not compatible with it#2021-03-2705:21jumarIt should work with native comp- might be a glitch with your build or system #2021-03-2713:17erwinrooijakkersFor running in the REPL the -A flag worked for my deps.edn, -M did not. Any idea why?
deps.edn
{:paths ["src"], :deps [org.clojure/clojure {:mvn/version "1.10.2"}], :aliases {:dev {:extra-paths ["resources"]}}}
Maybe I had something misconfigured above?
$ clojure --help | grep alias
-Oalias... Concatenated jvm option aliases, ex: -O:mem
-Ralias... Concatenated resolve-deps aliases, ex: -R:bench:1.9
-Calias... Concatenated make-classpath aliases, ex: -C:dev
-Malias... Concatenated main option aliases, ex: -M:test
-Aalias... Concatenated aliases of any kind, ex: -A:dev:mem
#2021-03-2713:46practicalli-johnny@erwinrooijakkers To use the -M flag, Clojure CLI tools version 1.10.697 or above is required. It seems from the clojure --help output you have an older version than this. Several flags changed meaning at this version of Clojure CLI tools onward.
To see the version, use:
clojure -Sdescribe
Install the latest version from https://clojure.org/guides/getting_started#2021-03-2718:03erwinrooijakkers$ clojure -Sdescribe
{:version "1.10.1.536"
#2021-03-2718:03erwinrooijakkersaha#2021-03-2718:03erwinrooijakkersthanks!#2021-03-2800:10practicalli-johnnyAfter a month or so of experimenting with the clojure-lsp and Cider, I've created a minimally invasive LSP client and server configuration that seems to work well with Cider.
The lsp configuration has been added to practicalli/spacemacs.d configuration for Spacemacs.
https://github.com/practicalli/spacemacs.d/
Details of the configuration can be found at https://practicalli.github.io/spacemacs/install-spacemacs/clojure-lsp/configure-lsp-and-cider.html
⢠lsp-ui with minimal decoration
⦠lense - shows number of times a function definition of var is referenced (useful for code archaeology)
⦠hidden sideline (as I find it very distracting - set to t if you wish to see that information constantly
⦠customise doom-gruvbox-light theme using theming layer to set a subtle lsp syntax highlight face
⢠Use cider-mode formatting rather than lsp - disable lsp formatting and indentation
If you are using this configuration and do not wish to use lsp yet, then remove the comment from the two variables in the clojure layer configuration
;; clojure-backend 'cider ;; use cider and disable lsp
;; clojure-enable-linters 'clj-kondo ;; clj-kondo included in lsp
This will disable LSP for cider, although LSP can still be used with other languages.
I still have a lot to learn about LSP, so welcome feedback and suggestions. If you do suggest enabling other features, it would be helpful to know the details of why you find it useful (rather than just saying its useful - which I'm afraid isn't that useful).#2021-03-2800:16ericdalloI think LSP format can be disabled on client side with just (setq lsp-enable-identation nil) instead of manually changing lsp cljfmt server config š#2021-03-2800:19ericdalloin LSP layer variables, lsp-modeline--enable-diagnostics is a internal function, I think you meant lsp-modeline-diagnostics-enable variable#2021-03-2800:21practicalli-johnnyI am not sure I understand, sorry.
I have set lsp-enable-identation nil when adding LSP.
The only thing I believe I am doing in .lsp/config.edn is to disable cljfmt.
Are you saying that lsp-enable-identation nil will disable cljfmt?#2021-03-2800:22ericdalloyou are already disabling on client-side, so no need to change any server config#2021-03-2800:23ericdallodisabling on client side will make lsp-mode don't request any format method to server, what means that server will not use cljfmt#2021-03-2800:23ericdalloless user config, resulting on the same#2021-03-2800:24practicalli-johnnyFor the practicalli/spacemacs.d project, I would like to make the configuration as self-contained as possible. Then its just a single clone to configure Emacs.#2021-03-2800:25ericdalloalright, and why my suggestion doesn't fit that? it'll achieve the same result you want without the need to change .lsp/config.edn#2021-03-2800:25practicalli-johnnyI think you are saying I can drop the dot-lsp/config.edn file completely, if I use lsp-enable-identation nil . I will try this out on Sunday. Thanks.#2021-03-2800:26ericdalloexactly š#2021-03-2800:26practicalli-johnnyOkay, I understand now. Thanks.#2021-03-3116:08cjsauer@jr0cket Iām trying out your spacemacs.d setup and itās really great! One thing I canāt seem to figure out: vim motions like { and } and [b etc (Tim Popeās unimpaired plugin) donāt seem to be working anymore, and have been replaced by some kind of s-exp motions. Is this something custom youāve configured? I canāt seem to find how to regain the default behavior.#2021-03-3116:36cjsauerAh, I found the issue. I had to comment out this line here https://github.com/practicalli/spacemacs.d/blob/2552390bd56445150615f74e22a631914bdd14c7/init.el#L895#2021-03-3116:43practicalli-johnnyThe ( and [ keybindings navigate s-exp boundaries in the practicalli configuration.
Do they do something different in the unimpaired plugin?
I dont think plugins can be considered default behaviour across Vim and Emacs#2021-03-3116:47practicalli-johnnyI dont advise switching off evil safe lisp structural editing for lisp / clojure as it increases the risk of breaking the structure of your code.#2021-03-3116:50practicalli-johnnyBut my config is for me, feel free to change it how you wish#2021-03-3117:03cjsauerMy muscle memory of using { and } to jump between āblocksā is too strong haha. Same with [b to jump to the previous buffer, etcā¦
Enabling structural safety also enables cleverparens, which appears to conflict with evil-unimpaired.#2021-03-3121:30pabloreNoob question: What is the most efficient way to wrap a sexp from (foo bar) to ((foo bar)) that also works with ] and } ?#2021-03-3121:32pabloreSPC k w works with only () parens#2021-03-3121:59practicalli-johnny@pablore I use surround from vim normal state, s followed by the character.
So to surround with {}
SPC v to select the sexp, s to surround and } to surround with {} without spaces#2021-03-3122:00practicalli-johnnyOr, use SPC k w and then , r c { to change the sexp to a hash-map#2021-03-3122:42cjsauer@pablore I do y s a ) } which also leverages vim surround. Mnemonic is āyes surround around parenthesis with curliesā. #2021-04-0112:03shanAlternatively, I sometimes create the pair and use spc k s to slurp the form in#2021-04-0119:18pabloreThose are a lot of keystrokes xD#2021-04-0119:23pabloreI think I like shan's alternative better#2021-04-0215:15cjsauerHas anyone encountered the lsp layer being too aggressive, prompting if I āwant to watch all filesā in some project that I donāt even have open right now? Itās also not part of my treemacs workspace. Iām pulling my hair out trying to stop lsp from even looking at directories that Iām uninterested in on startup.#2021-04-0215:18practicalli-johnnyI found LSP very aggressive by default. Took me a while to figure how to tone it down and just give me a few useful things. It's still a bit too invasive for me, but has a few things missing from cider#2021-04-0215:20practicalli-johnnyLSP will trigger when ever a file is open for a project. I used to have lots of layouts, one for each project, that really complicates things with LSP.#2021-04-0215:23practicalli-johnnyI need to figure out how to just use LSP when I want it there. I haven't found out how to switch it off when it's already running without disabling LSP completely and restarting Emacs#2021-04-0215:30cjsauerThatās what Iāve found as well. It seems to ālatch onā to projects that Iāve opened once in the past. Now I want to work on project X and LSP keeps starting up for the project that Iām not interested in anymore. Iām looking everywhere for some kind of LSP project list/cache/recent files etc to no availā¦#2021-04-0215:31cjsauerOohā¦`lsp-workspace-folders-remove` seems close#2021-04-0215:32practicalli-johnnyThat does sound useful. Let me know what works#2021-04-0215:34practicalli-johnnyThere are a lot of options to enable/disable
https://practicalli.github.io/spacemacs/install-spacemacs/clojure-lsp/lsp-variables-reference.html#2021-04-0218:46ericdallolsp-modeline--enable-diagnostics is still wrong on docs, it should be lsp-modeline-diagnostics-enable#2021-04-0215:37cjsauerPlaying around. That almost seemed to work. It no longer prompts to āwatch all filesā for that project after I used lsp-workspace-folders-remove on it, and then restarted emacs. However, now I keep getting the file is not part of any project. Selection action: prompt for the file from that removed project that I donāt have open anywhereā¦.frustratingā¦#2021-04-0215:37cjsauerLSP must keep some kind of permanent file list of everything you touch#2021-04-0216:26cjsauerI think the issue is that spacemacs is saving/restoring all the buffers even on exit, and LSP is scanning those buffers for potential targets. Is it possible to prevent emacs from restoring buffers from previous sessions? Tried (desktop-save-mode -1) in my user-config to no availā¦#2021-04-0216:28cjsauerMight be related to layoutsā¦not sureā¦I donāt personally use layouts at all#2021-04-0217:49practicalli-johnnyI do want Spacemacs to remember buffers and project, that is why I use layouts.
Layouts are more important to me than LSP as I regularly work on multiple projects. It's another reason I have struggled to adopt LSP myself.#2021-04-0218:16ericdalloYou can just disable file watchers with lsp-enable-file-watchers nil
https://emacs-lsp.github.io/lsp-mode/page/performance/#ignore-watch-foldersfiles#2021-04-1112:22sebastianHi. Very new to cljs here. I've encountered a problem with lsp in cljs. Whenever lsp detects an error it prevents me from typing. A current example:
I am trying out the re-frame starter app and playing around with it. In events.cljs is this function:
(re-frame/reg-event-fx
::set-active-panel
(fn-traced [{:keys [db]} [_ active-panel]]
{:db (assoc db :active-panel active-panel)}))
lsp says active-panel is an "unresolved symbol". If I put my cursor after active-panel in the params list lsp prevents any input. This also happens when I type my own functions. When I swap out the backend to cider I don't have that problem. So lsp has to be at fault here.
What exactly is causing these issues and how can I prevent this?
Has anyone else had that happen to them?
My Clojure layer setup is very basic.
(setq-default dotspacemacs-configuration-layers
'(
(clojure :variables
clojure-enable-fancify-symbols t
clojure-enable-clj-refactor t
;; clojure-backend 'cider
)
lsp
))#2021-04-1112:53practicalli-johnny@sebastian I have been trying to get a workable LSP configuration with minimal impact, but it requires a fair bit of configuration. You may have luck by just disabling indentation on the lsp layer, e.g.
(lsp :variables
lsp-enable-on-type-formatting nil
lsp-enable-indentation nil)
I have a bit of a walk through of my lsp config for Clojure here: https://practicalli.github.io/spacemacs/install-spacemacs/clojure-lsp/configure-lsp-and-cider.html#2021-04-1112:54sebastiangreat. I'll check that out.#2021-04-1112:57sebastianthis config fixes the issue with lsp preventing my input. thanks.#2021-04-1112:53practicalli-johnnyI also disabled cljfmt as it seemed a bit aggressive, although the above may also disable that already
https://github.com/practicalli/spacemacs.d/blob/live/dot-lsp/config.edn#L89#2021-04-1112:55practicalli-johnnyI keep tweeking this configuration to see what works best. However, unless there is something you definiately benefit from lsp, then I suggest disabling (use cider as the clojure backend) it until you have time to set things up.#2021-04-1112:59sebastianTrue. Currently there isn't as I am just starting out with clj/s. If I bump into more problems with lsp I'll go back to cider.#2021-04-1113:08practicalli-johnnyThe clojure-lsp project has had a lot more work put into it in the last few months and continues to be very active, so improvements are coming.
However, it still needs a bit of time to configure unless you want the whole IDE experience#2021-04-1114:58ericdallo@sebastian lsp-mode should not prevent you from input anything, make sure to update both clijure-lsp and lsp-mode, you can ask for help on #lsp as well :)#2021-04-1211:14practicalli-johnnyFor those experimenting with LSP features and not sure what is what, this is a really good guide and tells you want to switch off if you dont want it
https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/#2021-04-1804:06WestHey guys, I'm having a bit of a slowness problem with spacemacs.
I recently switched from using cider to the clojure lsp (the graalvm binary).
Scrolling, typing, deleting, autocomplete, all take a super long time. What gives?
I have no idea what the hell is going on.#2021-04-1804:08WestHere's my config. It's mostly based off practicalli's config.
https://gitlab.com/wildwestrom/dotfiles/-/blob/MacOS/emacs/emacs/spacemacs-config/init.el#2021-04-1811:21Luis Thiam-NyeYou appear to be using aggressive-indent-mode, which can cause conflicts. I've created a ~/.lsp/config.edn file https://github.com/syl20bnr/spacemacs/issues/14389#issuecomment-782012584 and it seems to be working quite well and fast.#2021-04-1813:50ericdalloYes, try disabling formatting as cljfmt has some performance issues sometimes, you can the performance section here as well:
https://emacs-lsp.github.io/lsp-mode/page/performance/#2021-04-1820:21WestIt looks like cljfmt is disabled in my lsp config.edn.
https://gitlab.com/wildwestrom/dotfiles/-/blob/MacOS/lsp/.lsp/config.edn#2021-04-1820:22ericdalloThe best way to disable indentation is via lsp-mode with lsp-enable-indentation#2021-04-1820:32Westset lsp-enable-indentation to nil?#2021-04-1820:33ericdalloyes#2021-04-1820:33WestLooks like it's already set to nil.#2021-04-1820:34WestLooks like I'll be using cider for awhile longer.#2021-04-1820:36ericdalloif it's nil, formatting is already disabled.
If you are having performance issues, and already followed https://emacs-lsp.github.io/lsp-mode/page/performance/ you can ask for help on lsp-mode https://discord.gg/swuxy5AAgT server.#2021-04-1820:36ericdalloBut I can say if you configure everything correctly, performance should be good#2021-04-1821:36WestOk, I reinstalled Spacemacs. After running the profiler, it seems like there were some artifacts left over when I tried emacs 28 with native-compilation.
Scrolling is much quicker than before.#2021-04-1821:37ericdalloGood š
I use doom-emacs with native-comp for months and works perfect too#2021-04-2110:27euccastrohow do you pin a specific CIDER version in spacemacs? I just upgraded to develop and I get
error in process sentinel: Could not start nREPL server: Downloading: cider/cider-nrepl/0.26.0-SNAPSHOT/maven-metadata.xml from clojars
Downloading: cider/cider-nrepl/0.26.0-SNAPSHOT/cider-nrepl-0.26.0-20210418.130850-4.pom from clojars
Downloading: org/clojure/clojure/maven-metadata.xml from clojars
Downloading: org/clojure/clojure/maven-metadata.xml from central
Downloading: org/clojure/clojure/maven-metadata.xml from maven-central
Error building classpath. Malformed \uxxxx encoding.
java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
at java.util.Properties.loadConvert(Properties.java:574)
at java.util.Properties.load0(Properties.java:390)
at java.util.Properties.load(Properties.java:341)
at org.eclipse.aether.internal.impl.TrackingFileManager.read(TrackingFileManager.java:56)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.read(DefaultUpdateCheckManager.java:511)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkMetadata(DefaultUpdateCheckManager.java:250)
at org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolve(DefaultMetadataResolver.java:302)
at org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolveMetadata(DefaultMetadataResolver.java:181)
at org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:213)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:282)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:229)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:207)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:262)
at clojure.tools.deps.alpha.extensions.maven$get_artifact.invokeStatic(maven.clj:122)
at clojure.tools.deps.alpha.extensions.maven$get_artifact.invoke(maven.clj:116)
at clojure.tools.deps.alpha.extensions.maven$eval1084$fn__1086.invoke(maven.clj:137)
at clojure.lang.MultiFn.invoke(MultiFn.java:244)
at clojure.tools.deps.alpha$download_libs$fn__811$fn__812.invoke(alpha.clj:462)
at clojure.tools.deps.alpha.util.concurrent$submit_task$task__502.invoke(concurrent.clj:34)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
#2021-04-2313:19jumarI've started reading the Software Design for Flexibility book and wanted to try it in Scheme.
But I got stuck - I installed this layer: https://develop.spacemacs.org/layers/+lang/scheme/README.html
(scheme :variables
scheme-implementations '(mit racket))
I have mit scheme interpreter installed on my MacOS (via homebrew).
But when I try to eval a file (`,e b` ) it just keeps asking if I want to start the repl and nothing really happens.
I tried (setq geiser-mit-binary "/usr/local/bin/scheme") but now it's not doing anything at all (not even prompting me)
Does anybody have a working setup?#2021-04-2313:44practicalli-johnnyI assume you restarted Spacemacs after installing Scheme and you have been able to run scheme on the command line.
Also assume you've checked spacemacs.env shows the correct values for path.
You may get more feedback on the Spacemacs Gitter channel. Sorry I can't be of more help.#2021-04-2313:46jumarYep, I restarted and I can run it on command line. I checked env now and it looks good I think.
I'll try again later.#2021-04-2313:46jumarThanks!#2021-04-2416:43Drew VerleeAny ideas how or why pretty print is putting the first line of output on the same line as the last line of the expression rather then below it (the desired behavior).
Getting:
(for [x (range 10)]
[x x x ]);; => ([0 0 0]
;; [1 1 1]
;; ....
want
(for [x (range 10)]
[x x x ])
;; => ([0 0 0]
;; [1 1 1]
;; ....
#2021-04-2417:04practicalli-johnny@drewverlee I get what you want when using cider-pprint-eval-defun-at-point#2021-04-2417:09practicalli-johnnyI get the comment starting on the same line as the code when using cider-pprint-eval-last-sexp-to-comment which is not what you were looking for..#2021-04-2417:10practicalli-johnnySo in Spacemacs, use the , e p ; rather than the , e p : key binding#2021-04-2417:44Drew VerleeI'll give that a try thanks.#2021-04-2418:20Drew Verleeyea that works well enough for now. thanks.#2021-04-2418:35practicalli-johnnyI assume they are different as the last-sexp would be used with expressions inside other expressions#2021-05-1113:03practicalli-johnnyI've started letting LSP do the formatting control in my practicalli/spacemacs.d configuration, rather than Cider. This seems to work quite well, although it seems to be missing automatic vertical alignment of pairs, as in let statements, loop or for arguments or in hash-maps.
I've also added updates from the spacemacs.tempate after pulling the latest commits to Spacemacs itself.
https://github.com/practicalli/spacemacs.d#2021-05-1115:50ericdalloNice!
Yes, there is a issue for that on cljfmt :)
c/c @UE21H2HHD#2021-05-1115:54lreadYeah, Iām trying to get some input on what folks would want for vertical alignment formatting from cljfmt.
My thinking is something youād have a preference for (on or off) but something you want to sometimes enable/disable for a specific forms, probably through some inline directive.#2021-05-1116:02ericdalloYeah, it's a good question#2021-05-1116:02ericdallomaybe some way to specify the forms you want vertical align would work for everyone?#2021-05-1116:03ericdallowith a :all option flag as well?#2021-05-1116:34lreadThereās a https://docs.cider.mx/cider/indent_spec.html which, for some reason, has not been widely adopted. Maybe we could add an inline {:style/vertical-align (true|false)}. Which would override some project default which would override a default of false.#2021-05-1117:33practicalli-johnnyThanks for the reminder, I will go and add some examples and my shopping list of features š#2021-05-1117:34lreadHereās the https://github.com/weavejester/cljfmt/issues/36 if you have anything to add!#2021-05-1118:01practicalli-johnny@UE21H2HHD I've added some initial thoughts and examples of what I currently do. I'll add more if I think of anything. Happy to do some beta testing if needed. Thank you.#2021-05-1118:02lreadCool, thanks so much @U05254DQM!#2021-05-1118:03emilaasaYou're doing the lords work @U05254DQM š#2021-05-1118:09practicalli-johnnyPossibly, but the work for which lord I cannot be certain of though š
I certainly appreciate @UE21H2HHD spending time on this issue and @UKFSJSM38 for all the help with making lsp work for me (and a great many others)#2021-05-1118:14lreadThanks John, I started work on cljfmt vertical alignment in Feb of 2019, and then figured I should fix a bug in rewrite-cljs to aid the fix, then⦠well⦠rewrite-cljc then rewrite-clj v1 and finally⦠maybe Iāll actually get back to what sparked my meandering journey: the cljfmt vertical alignment feature!#2021-05-1118:15lreadIāll certainly take you up on your offer of testing when the time comes!#2021-05-1206:03craftybonesIf I want to use spacemacs, but plug directly into a Clojure CLI(not nrepl), what are my options?#2021-05-1208:10practicalli-johnnyAs I understand it, a REPL is an external process that requires a protocol to connect.
This is the case when running a repl with either Leiningen or Clojure CLI tools (i.e. cider-jack-in).
nrepl is by far the most common protocol and enables a rich set of features via the Cider package.
Other options I am aware of are socket REPL and prepl.
Socket REPL is part of the Clojure library, so included in any project that has org.clojure/clojure as a dependency.
https://github.com/clojure-emacs/inf-clojure is an Emacs project that uses Socket REPL to connect to a running REPL, providing what they describe as essential features (a sub-set of features you would get with Cider & nrepl). I am assuming this would be used instead of the Clojure layer, so you would need to add as additional-packages or create/find a private Spacemacs layer for inf-clojure.#2021-05-1208:12practicalli-johnnyhttps://github.com/practicalli/clojure-deps-edn#alternative-repls has examples of running a repl with different protocols, such as socket repl#2021-05-1208:14practicalli-johnnyhttps://oli.me.uk/clojure-socket-prepl-cookbook/ may give some insight into using these alternative protocols for connecting to a repl.#2021-05-1209:55craftybonesThanks @U05254DQM#2021-05-1210:10practicalli-johnnyI would be interested to hear how you get on, as I have only ever used nREPL myself. Thank you.#2021-05-1211:58practicalli-johnnyAdded a short page on using Magit to checkout a branch from a remote repository to the Magit section of Practicalli Spacemacs.
Anything else that would be useful to add?
https://practicalli.github.io/spacemacs/source-control/magit/remote-repositories/checkout-remote-branch.html#2021-05-1219:38WestGotta addĀ `SPC g m`Ā orĀ `C-c C-c`Ā for magit dispatch. It shows all the useful commands, including push pull commit etc. Took me so long to find that menu. Also C-gĀ to exit that menu (not sure if it has a spacemacs-like binding).#2021-05-1219:38WestGotta addĀ `SPC g m`Ā orĀ `C-c C-c`Ā for magit dispatch. It shows all the useful commands, including push pull commit etc. Took me so long to find that menu. Also C-gĀ to exit that menu (not sure if it has a spacemacs-like binding).#2021-05-1221:34practicalli-johnny@c.westrom so it seems magit-dispatch is like having all the commands available from the magit-status buffer without having the magit-status buffer. Is that about right??#2021-05-1222:02WestYes. It's also nice to have even while in magit status. That's how I found the other controls for staging and discarding changes.#2021-05-1222:55practicalli-johnnyInteresting. I use the ? key binding in magit status buffer to see the magit commands. It seems to be the same as running magit-dispatch when also in the magit-buffer.#2021-05-1307:05WestI didnāt know about the ? shortcut. I guess Iāll use that next time.#2021-05-1312:14practicalli-johnnyI added magit-dispatch to the magit status page anyway. I'll try the dispatch command outside magit-status buffer and see if it fits into my workflow. Thanks.
https://practicalli.github.io/spacemacs/source-control/magit/status.html#2021-05-1518:40Ben SlessHi all, anyone here uses CIDER + LSP such that CIDER's function's always take precedent over LSPs? I prefer LSP would enhance CIDER instead of taking over some of its functionality#2021-05-1518:53practicalli-johnnyThis is a very minimal LSP setup
https://practicalli.github.io/spacemacs/install-spacemacs/clojure-lsp/configure-lsp-and-cider.html#2021-05-1519:28Ben SlessAre there other behaviors lsp hijacks besides , h h? I saw your ticket in spacemacs's repo#2021-05-1520:48ericdalloYou may find more conflicts/tips here: https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/#2021-05-1615:42Felipe MarquesHi, all!
I'm trying to integrate clj-kondo in spacemacs, but I'm having some problems.
I followed the instructions here:Ā https://cljdoc.org/d/clj-kondo/clj-kondo/2021.04.23/doc/editor-integration#spacemacs
But flycheck is not enable by default, I must runĀ `SPC t s`Ā to toggle the syntax-checking, even after doingĀ `(setq global-flycheck-mode t)`Ā in my .spacemacs file.
Does anyone had the same problem?
Thanks in advanceĀ š#2021-05-1618:01practicalli-johnnyI havent had any issues with clj-kondo in the last year or so.
Ensure the syntax-checking layer is enabled as this installs flycheck.
Ideally Spacemacs version 0.300 should be used as this is where bugs are resolved.
If you can share a link to your .spacemacs file then it may be possible to spot an issue (please dont paste the whole file into slack)#2021-05-1618:59Felipe Marqueshttps://gist.github.com/felipegmarques/e2c1b76b38ae95a5bc443a0b8191939e#2021-05-1618:59Felipe MarquesWhen I enable syntax-checking(`SPC t s`) on the buffer, the clj-kondo works as expected.#2021-05-1623:14practicalli-johnnyI haven't used the older way to include clj-kondo. I've only used the Clojure layer option since the end of 2019.
The only suggestion I have is to update to Spacemacs 0.300 (develop).
Sorry I don't have any other ideas.#2021-05-1711:18Felipe MarquesNo problems, I'll try to update to the develop version. Thanks!#2021-05-1818:12omendozarHi, Iām using Leuven Theme with spacemacs. Does anyone knows how to turn the inline evaluations into a light color mode? Leuven is beautiful but has this problem to show the results.#2021-05-1909:59practicalli-johnny@orlandomr27
If you can find out the face name for inline evaluation output (perhaps ask in #cider for that) then the background colour could be changed using customize or over-ridden using the theming layer in spacemacs
I used the theming layer to change the way symbols are highlighted by lsp in this example
https://practicalli.github.io/spacemacs/install-spacemacs/clojure-lsp/configure-lsp-and-cider.html#customising-symbol-highlighting#2021-05-1914:52omendozarThank you John. Iāll find out the face name for inline evaluation and try your advice.#2021-05-2013:53jumarLet's say I have this log message in the REPL buffer:
2021-05-20 13:48:44.970 INFO [app.some.ns:276] - ...
How would I go about implementing a custom handler so that when I press g d (jump-to-definition), while the cursor is somewhere inside the app.some.ns:276 string, it would jump to that namespace at given line?#2021-05-2210:15Chae CrambTrying Spacemacs/Emacs for the first time. Is it normal to get lots of warnings on first install?
Itās a fresh install of Ubuntu 21.04 Spacemacs and Emacs.
Iām getting this in the top pane:
`Warning (evil-collection)L 'evil-want-keybinding' was set to nil but not before loading evil.
Make sure to set 'evil-want-keybinding' to nil before loading evil or evil-collection.`
And lots of warnings in the Compile-Log.#2021-05-2212:54OliverHow did you install Spacemacs? It's highly recommended to go for the development branch. John Stevenson @U05254DQM has put together very good explanations around using Spacemacs for Clojure, including installation/update guide and introduction. https://practicalli.github.io/spacemacs/#2021-05-2214:49practicalli-johnny@U020X5D9KEK warnings can be common when installing a lot of Emacs packages. There are several hundred packages installed when Spacemacs is first run, so its expected to have a few warnings. If the same warnings happen after restarting Spacemacs ( SPC q r ) then it may be worth looking at the warning messages.#2021-05-2214:50practicalli-johnnyI typically restart Spacemacs after installing packages anyway#2021-05-2315:53Chae CrambOk, great. Itās actually @U05254DQMās guide that Iām using. Thank you!#2021-05-2317:17practicalli-johnnyI'll add a hint to the book to expect some Emacs package warnings on first install. That seems a useful addition. Thanks.#2021-06-1608:54zendevil.ethMy spacemacs has a bug. When Iām using it, a window split occurs and Warnings opens with the following info:
Warning (emacs): recentf mode: Doing chmod: Operation not permitted, /Users/prikshetsharma/.emacs.d/.cache/recentf
Warning (emacs): recentf mode: Doing chmod: Operation not permitted, /Users/prikshetsharma/.emacs.d/.cache/recentf
Warning (emacs): recentf mode: Doing chmod: Operation not permitted, /Users/prikshetsharma/.emacs.d/.cache/recentf
Warning (emacs): recentf mode: Doing chmod: Operation not permitted, /Users/prikshetsharma/.emacs.d/.cache/recentf
how do I fix this?
Thank you.#2021-06-1609:26WestLooks like something is awry with your permissions. Now Iām just guessing here, but try seeing what your permissions are for recentf and your emacs executable. You can find out using ls -l.#2021-06-2622:49rbergerHow would I make it so spacemacs will not change the indention within a #_(some text) expression? Iām using that as a comment block but Spacemacs is resetting the indentation which doenāt allow me to do nested bullets.#2021-06-2718:30practicalli-johnnySorry, I don't understand the question or what nested bullets are in Clojure, do you have a specific example?#2021-06-2719:23rberger@U05254DQM Lets say I wanted to have something like
#_(
* If foo room/token info does not yet exist for this event
* Create the foo room for the event
* `name`: Ether set it as a kebab-case version of the display-name or empty
* If empty, foo will set a unique name
* `privacy`: Optional "private" | "public" defaults to public
)
If I put that in a clj or cljs file, emacs will force all the bullet items to be at the same indention:
#_(
* If foo room/token info does not yet exist for this event
* Create the foo room for the event
* `name`: Ether set it as a kebab-case version of the display-name or empty
* If empty, foo will set a unique name
* `privacy`: Optional "private" | "public" defaults to public
)
Itās the same if I use `#_(comment ā¦.)
My emacs config is based on the practicalli spacemacs init.el though it possibly was modified at some point that might impact this. I havenāt done too many modifications though.
I donāt really know how to track down what emacs feature / package might be doing this. Its not a super big deal, I ended up putting this kind of planning doc into its own markdown file. Though it would be nice to be able to make markdown blocks like that inline in the clojure files.#2021-06-2721:10practicalli-johnnyAs it's not Clojure, I would write this text as line comments using ;;
A (comment ) block could be used to contain this text as line comments, interspersed with actual Clojure code on its own lines, if that aids with implementation.#2021-06-2721:31rbergerYeah, I hate that (Code blocks with each line requiring semi-colons) Have the added complication that Iām trying to document re-frame handlers which canāt use docstrings ;-(#2021-06-2721:34rbergerLike I said, not a big deal, but this is an area where IMHO, clojure falls down a bit. There should be less friction to document things. (Note: I love clojure[script], this is a nit)#2021-06-2807:50practicalli-johnnyI'm afraid I don't share the same view. I find Clojure is very easy to document and add live documentation with rich (comment ,,,) blocks, more so that most languages I've worked with.
And Spacemacs has gcc key binding to convert a line to a line comment and gc to convert a region to a line comment.
If re-frame handlers cannot have doc-strings, then that is a negative aspect of the re-frame design and I would question why they cannot have doc strings. There are always line comments as a fallback. To me, this is separate from documenting Clojure itself.
I aim to write code that is highly readable, which is usually quite easy in Clojure. I find doc strings are an essential part of the code design and should elaborate on the reason for this particular function to exist. This may be complemented by a rich comment block that shows examples of how to work with a particular piece of code. Then you have the ubiquitous line comment for anything else (namespace headers, logical separation of code sections - also helps with refactoring)
I also find having a separate design journal namespace invaluable for capturing the essential design decisions that are otherwise so easily lost.#2021-06-2822:46rbergerOne issue is that the commnets / comment blocks donāt show up in codox views.
And Iām at a loss as to what to do with re-frame events/subscriptions which are declared with something other than fn/`defn` and thus canāt have docstrings or show up in codox views. Someone suggested a macro but that seems like its going to end up getting complicated.
I kind of wish metadata was universal (could be applied to any clojure element) and then be able to have more structural docstrings. Like put the argument descriptions with each argument as a meta tag. Or still create a docstring for the keyword names and arguments of the re-frame events/subscription definitions that could be interpreted by codox or other similar toolsā¦
Anyway, this is probably not the right forum for this discussion. Appreciate your help and insights!#2021-07-0520:21Drew VerleeAre their any good tutorials on how to include functionality from a .el file such as https://github.com/dakra/datomic.el/blob/master/datomic.el my google searches are failing so far.#2021-07-0520:21Drew Verleehttps://gist.github.com/TheBB/367096660b203952c162 looks promising#2021-07-0520:30Drew Verleeprobably in my .spacemacs file#2021-07-0520:44Drew Verleei'm suprised there isn't a convention. so i need to update my path to include a folder and put my lib there. I can't use .emacs because thats under source control. Though i guess a file could be gitignored.#2021-07-0520:45practicalli-johnnyIf it's self contained code, then add it to the dotspacemacs/user-config section.
Or create a private Spacemacs package containing the .el file.#2021-07-0520:46Drew VerleeAdding it to the user-config would mean copying the entire .el file into it?#2021-07-0520:47practicalli-johnnyYes, its a lot of code too, so a private package would be the recommended approach#2021-07-0520:53practicalli-johnnyIt doesn't look like it's a normal Emacs package, otherwise it could just be added via dotspacemacs/additional-packages in .spacemacs#2021-07-0520:57practicalli-johnnyhttps://develop.spacemacs.org/doc/DOCUMENTATION.html#managing-private-configuration-layers#2021-07-0521:03Drew Verleethanks ill take a read, might be more trouble then its worth.#2021-07-0620:41practicalli-johnnyI havent used Datomic for ages and havent actually used Datomic Ions, although I like the architecture of that approach.
It does seem a lot of code for what I believe is just 3 Clojure command lines - well it seems like its one command with three different options passed :woman-shrugging:#2021-07-0620:43practicalli-johnnyI would prefer to run these deploy and status commands in a terminal window anyway.#2021-07-0621:58practicalli-johnnyThere has been a significant update to the automatic-highlightsymbol Emacs package and it is causing symbol highlighting to be on by default in all modes. This is a change to the default behaviour in Spacemacs which has this mode switched off.
My fix was to copy the original auto-highlight-symbol-20210108.1841 package from the ~/.emacs.d/.cache/rollback/<emacs-version>/develop directory to ~/.emacs.d/elpa/<emacs-version>/develop directory and move or delete the newer package.
There is an issue on Spacemacs discussing other options and if not using the symbol highlight transient menu key bindings, # and * then you can remove the hooks for automatic-highlight-symbol mode
https://github.com/syl20bnr/spacemacs/issues/14880#2021-07-0716:42Drew Verleegiven a deps.edn such as :paths ["src/main"] and a file structure like src/main/... when i create a new file in emacs using space f f (not sure the fn name) src/main/foo.clj i want the text (ns foo) to appear, instead i get (ns main.foo). It seems the auto generated ns ignores the deps path. Is there a way to resolve this?#2021-07-0716:43Drew Verleeit's not a big deal to just have two starting file paths e.g src/main + src/deploy becomes "src" and "deploy" i don't think eithr is really that hard to understand.#2021-07-0716:50Drew Verleealso anyone know what this moving white box graphic is indicating? its annoying. It's telling me something is happening, but with no pointers as to what.#2021-07-0722:00practicalli-johnnyMy guess is its some longish running process. When the repl is running a long evaluation you see |== | in the mode line with the repl buffer highlighted.
It could be an indicator for the lsp process, showing when its doing static analysis.#2021-07-0722:02practicalli-johnnyI stopped using the Spacemacs modeline theme a while ago as I wanted something very basic and undistracting.#2021-07-0723:03ericdalloIt's is from lsp-mode#2021-07-0723:03ericdalloYou can fix it manually with M-x lsp#2021-07-0723:03ericdalloBut feel free to open an issue on lsp-mode#2021-07-0722:05practicalli-johnnyAuto-insert of the namespace when creating a new file is either from LSP or clj-refactor. If you do not have clj-refactor installed, then I'd suggest asking about this issue on the #lsp channel (they are really responsive to issues)#2021-07-0723:04ericdalloYes āļø also make sure you have a updated clojure-lsp, we fixed a issue related to that recently#2021-07-1922:23filter-map-reduceHi, would anyone have an idea why spacemacs offers path intellisense when I write Python scripts for instance, but not when I write Clojure (having connected to the REPL with CIDER)? It doesn't seem to autocomplete file paths when writing Clojure code.
Many thanks in advance#2021-07-2009:26practicalli-johnnyDo you have an example piece of code that you would expect to have file path completion?
I have had path completion at times when doing Clojure code. Not something I really look for though.#2021-07-2009:33WestShow us your config. Iāve been able to complete paths within the classpath.#2021-07-2013:33practicalli-johnny@U026662D8R3 I appreciate this is of little help, but it seems to work for me#2021-07-2013:34practicalli-johnnyTypically is a package that needs updating or possibly a change to a package that needs a fix from the Spacemacs repository#2021-07-2013:35practicalli-johnnyIt could be LSP doing this, although I have a feeling this worked before LSP#2021-07-2015:00filter-map-reduceMany thanks for your suggestions. I've set up Vim with Iced (I'm more comfortable with Vim) for now.#2021-07-2614:24Westhttps://youtu.be/_Wt4bhy_SFA Iāve got a problem where dir-locals doesnāt work.#2021-07-2614:46practicalli-johnnyDid you use revert-buffer to load the .dir-locals.el ??#2021-07-2614:47WestI did in fact.#2021-07-2614:47practicalli-johnnyI am still watchign the video š#2021-07-2614:47Westthough maybe my vid doesnāt show it#2021-07-2614:48practicalli-johnnyProcess should be, create/edit the .dir-locals.el file, save it, jump to clojure buffer, revert clojure buffer and then run cider-jack-in#2021-07-2614:48WestIāll try it out#2021-07-2614:48WestIāll try it out#2021-07-2614:49practicalli-johnnyNewer versions of Cider are using the variable
cider-clojure-cli-aliases
Unless they have changed it back to global-optoins already š#2021-07-2614:51practicalli-johnnyThis is what I am using at my current project at work
((clojure-mode . ((cider-clojure-cli-aliases . ":env/develop:env/test"))))
#2021-07-2615:05WestAlright, Iāll try this out.#2021-07-2615:12WestIt works! Thank you so much!#2021-07-2615:17practicalli-johnnyYou can also use SPC u SPC SPC cider-jack-in-cljs and the full jack-in command will show in the mini-buffer, allowing you to edit the command. It should be possible just to edit the last part of that command in the mini-buffer, adding your aliases to the start of -M:cider/nrepl
So if you have an alias of :env/test to add a test path, then the last part of the command would be -M:env/test:cider/nrepl
The main function is called from the cider/nrepl alias, so that must go last.#2021-07-2615:18practicalli-johnnyI should add that bit to my page on this subject (reminder to self)
https://practical.li/spacemacs/clojure-projects/project-configuration.html#2021-07-2717:19jcdHow do folks handle merge conflicts with spacemacs? The ediff keybindings conflict with evil mode it seems. Am I holding it wrong?#2021-07-2717:25practicalli-johnnyI haven't noticed any conflict between Evil key bindings and ediff. I can navigate between changes using j or k and select change with a or b.
Can you give examples of what is in conflict?
Are you using the now quite outdated version 0.200 of Spacemacs?#2021-07-2721:03jcdwhich window are you in when you navigate with jk? Let me try pulling the most recent spacemacs and see if that does the trick#2021-07-2722:03practicalli-johnnyThe diff controls are in window 3, the small one at the bottom. I don't use ediff very often, but I have used it for at least a year without any problems.
I am running Spacemacs 0.300#2021-08-0106:38practicalli-johnnyOne tip I have been missing out on for years is when editing a directory path in helm, e.g. when moving a file to a different location using SPC f R
After running SPC f R then the left arrow key will navigate back up the directory hierarchy, deleting the file name and each successive directory from the path. This provides a quick way to go to a different location. However, the file name and directory names are all gone, so you need to type them in again
Using C-left arrow will move the cursor up the directory hierarchy without deleting parts of the path, so you can simply edit a particular part of the path. C-right arrow also descends the directory hierarchy in the path without deleting anything, making it easy to jump to the start or end of each name in the path.
I cant believe I've never tried this before, it makes things so much easier :rolling_on_the_floor_laughing:#2021-08-0406:34jumarMeta-arrow might be even more useful; especially since C-arrow is mapped to switching between screen spaces on my macOS š#2021-08-0406:37jumarI also tend to use C-l (closer to my fingers than the arrows) when I'm fine with "deleting" the parts of the path#2021-08-0309:03tvaisanenQuick question:
How to configure user defined functions to be shown in "function color"?
i.e.
How to render foo in same color as inc inc#2021-08-0314:55Mario C.I'd like to know this as well. I know it will work if you import the foo function into another namespace. But within the same namespace it does not register it. Also, what theme are you using?#2021-08-0315:06tvaisanenI'm using doom-palenight.#2021-08-0315:20Mario C.thanks!#2021-08-0318:32zaneYou can put the cursor on the character whose color you want to change and run M-x describe-face.#2021-08-0318:32zaneThat will tell you the name of the āhttps://www.gnu.org/software/emacs/manual/html_node/emacs/Faces.htmlā.#2021-08-0318:34zaneFrom there you can https://www.gnu.org/software/emacs/manual/html_node/emacs/Face-Customization.html the face or use https://www.gnu.org/software/emacs/manual/html_node/emacs/Colors.html of the face with M-x set-face-foreground.#2021-08-0318:35tvaisanenThanks, will try that tomorrow.#2021-08-0318:37zaneIf it doesnāt seem like the correct face is being applied at all thatās probably because clojure-modeās font locking is very conservative:
> Precise font-locking requires additional data that can obtained from a running REPL (thatās how CIDERāsĀ https://docs.cider.mx/cider/config/syntax_highlighting.htmlĀ works) or from static code analysis.
> ā https://github.com/clojure-emacs/clojure-mode#font-locking#2021-08-0318:37zaneYou may need to use https://github.com/clojure-emacs/cider to get the behavior you want.#2021-08-0816:09Drew Verleewhen you enter cider debug mode, the inspect/P key is bound to something else, possible indent. Whats a good way to resolve this so that cider debug mode has priority?#2021-08-0817:39practicalli-johnnyThere is code already in the Clojure layer to manage this, although it doesn't seem to work for some characters.
One approach is to use C-z to toggle into Emacs mode and back to Evil mode when you have finished.#2021-08-0902:48Drew VerleeI'll do that for now :)#2021-08-0911:21paulspencerwilliamsSo, Iām suffering āUnbalanced parensā when viewing the reply history C-c M-p andĀ I think itās caused by me enabling Paredit by default using this hook registration. Can anyone recommend an idiomatic solution to it?
(defun dotspacemacs/user-config ()
(add-hook 'clojure-mode-hook 'enable-paredit-mode))
I assume itās actually happening because Iāve old broken repl commands?#2021-08-0920:07Drew VerleeI recommend not using paredit, its a great idea, its just not as integrated into spacemacs.
In my dotspacemacs init i have
dotspacemacs-smartparens-strict-mode t
dotspacemacs-smartparens-closing-parenthesis t#2021-08-0920:07Drew Verleeafter much pain, i settled on smartparens, which does everything i can think of and more#2021-08-1005:24paulspencerwilliamsOkay, cheers. Iāll have a play with smartparens - it seems pretty well used!#2021-08-1005:43practicalli-johnnySmartparens is paredit that can be used for all languages, not just lisps. It's also maintained, unlike paredit
Enable smartparens strict mode globally in the spacemacs.el configuration file to get the strict nature of paredit
dotspacemacs-smartparens-strict-mode t
#2021-08-1005:45practicalli-johnnyOn the rare occasions I use the REPL buffer directly, I have experienced any issues with history. I use Ctrl and the arrow keys to navigate the history in the REPL buffer#2021-08-0920:04Drew VerleeIs there a way to keep the window/buffer layout when you come back from magit actions (such as magit-status). It's really really annoying when i exit and it removed my entire workplace.#2021-08-0921:39practicalli-johnnyI use magit in 'fullscreen' mode (or is that maximised).
When I use q to quit magit-status it takes me back to the window/buffer layout before I called magit-status#2021-08-0921:39practicalli-johnnyYou could also try SPC w u for winner-undo#2021-08-0921:41practicalli-johnnySPC g s opens Magit git client full screen (q restores previous layout)
(git :variables
git-magit-status-fullscreen t
magit-diff-refine-hunk t
git-enable-magit-todos-plugin t)
#2021-08-0923:28Drew VerleeI'll try that, as always, thanks a ton#2021-08-1013:50Drew VerleeSPC w u does the trick. How did you figure that out?#2021-08-1018:01practicalli-johnnyErm, that is what that command does š#2021-08-1018:01practicalli-johnnyIt undoes the last change to the window layout. Admittedly it took me a year to discover that :rolling_on_the_floor_laughing:#2021-08-1008:59practicalli-johnnyOrg-jira is a very nice interface for creating, updating and managing the workflow of Jira issues from the comfort of Spacemacs. It even works if your company uses single sign-on to manage the Jira account (I've used a token for this, generated from my jira account page)
I'm going to write up a page on setup and use, with any tips I find, although its fairly straight forward. I've defined the steps here
https://github.com/practicalli/spacemacs-content/issues/291#2021-08-1022:40Drew Verleewould anyone know the smart parens key to jump from the current s-exression to the beginning of the its parent?#2021-08-1022:41Drew Verleenever mind found it#2021-08-1103:24West@drewverlee which one was it?#2021-08-1105:15WestI just figured out something super helpful for me!
We most of us know how to set our fonts.
dotspacemacs-default-font '("FiraCode Nerd Font"
:size 24.0
:weight normal
:width normal)
What bothered me was that this would not affect Japanese text, or any other unicode text for that matter. This is what I had to do to make it work:
(defun dotspacemacs/user-config ()
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Font for all unicode chars
(when (member "HackGen35Nerd" (font-family-list))
(set-fontset-font t 'unicode "HackGen35Nerd Console" nil 'prepend))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
)#2021-08-1107:50prncIn spacemacs/helm-project-smart-do-search (i.e. SPC /) is there a way to narrow the search to files matching pattern/glob e.g. *.cljs files only (when using rg)?
When using ag as the underlying grep-like binary you can pass a param e.g. -Gcljs for example so you can do a search like layout -Gcljs and get desired results back, canāt seem to find a way to do it with rg under spacemacs/helm-project-smart-do-search any ideas? š#2021-08-1107:51prncOr maybe is there a better way to perform this kind of project search?#2021-08-1108:50practicalli-johnny-g
https://practical.li/spacemacs/spacemacs-basics/working-with-projects/searching-projects.html#searching-specific-files
@prnc#2021-08-1109:05prncYes! Thanks so much š Iāve tried the long version --glob and that didnāt seem to work, but -g does 𤷠š#2021-08-1109:08prncAlso, interesting, the āglobbingā behaviour is different between ag and rg here, e.g. w/ rg you need to be explicit: -Gcljs (for ag) vs. -g*cljs (for rg)#2021-08-1710:54lukas.rychteckyHej, I am on develop branch and I have updated Spacemacs. It seems that parinfer has been replaced by parinfer-rust-mode. But itās not working, it says that parinfer smart indent mode is on, by parens arenāt balanced by indent. Do I need to update my dotfile or something? Thanks for help.#2021-08-1712:34practicalli-johnnySPC fbe D will run a diff of your .spacemacs file and the latest Spacemacs template file.
I assume it's more likely a package or three that needs updating, SPC f e U
I use strick smartparens rather than parinfer. I don't like the parinfer approach myself, so don't know if there is a bug.#2021-08-1713:00lukas.rychtecky@U05254DQM Thx, I will try it :thumbsup:#2021-08-1713:27lukas.rychteckyThat helped š#2021-08-1908:41kah0onaHello folks,
I upgraded emacs to 27.2, and my ā*ā and ā#ā buttons (to go to next appearance of word under cursor) stopped working, showing:
Symbolās function definition is void: spacemacs/symbol-highlight-transient-body#2021-08-1908:41kah0onaany idea what might cause this?#2021-08-1908:42kah0onaIām kinda used to using VIM commands # and * ..#2021-08-1908:45practicalli-johnnyUpgraded from what version of Emacs? Another 27.x version or 26.x
Did you upgrade packages / Spacemacs /dotfile from template?#2021-08-1909:15kah0ona27.1 to 27.2#2021-08-1909:15kah0onabasically removed emacs completely, and reinstalled, using brew cask#2021-08-1909:15kah0onait kind of works well in all other regards#2021-08-1909:16kah0onamacOS btw#2021-08-1909:17kah0onashould I do something to spacemacs too?#2021-08-1909:29practicalli-johnnyMy guess is that the Emacs packages updated and maybe something changes in their API.
Or the packages need to be complied ) although I thought that was just for major Emacs versions).
Simple things to try in no particular order
1) SPC f e D to check nothing is missing from the Spacemacs template
2) SPC f e U to update Emacs packages, maybe there was a temporary bug
3) remove the . emacs.d/elpa directory (or delete specific .elc files) and restart Emacs
4) Update Spacemacs https://practical.li/spacemacs/install-spacemacs/update.html
Some other trouble shooting suggestions here
https://practical.li/spacemacs/install-spacemacs/troubleshooting.html#2021-08-1910:51kah0onaThx, will go through these!#2021-08-1919:11Drew Verleehow would i go about adding something to my emac exec-path or checking what's on it? I need to put node there as per these instructions: https://docs.cider.mx/cider/cljs/other_repls.html#2021-08-1919:12Drew Verleethough i just realized i have been selecting shadow not node as my repl choice#2021-08-1919:12Drew Verleewhich is likely the real issue#2021-08-1919:13Drew Verleewell my node connection failed to#2021-08-1919:13Drew Verleeand now it worked#2021-08-1919:13Drew Verleethanks universe#2021-08-1919:13practicalli-johnnySPC f e e to view or edit environment variables.#2021-08-1919:15practicalli-johnnyA REPL restart is required to pick up new env vars or changes#2021-08-1919:15Drew VerleeDo you think i would just be adding node to my PATH then?#2021-08-1919:15Drew Verleeor do i need to add a EXEC-PATH variable?#2021-08-1919:19Drew Verleeerr don't worry about it. i think i'm barking up the wrong tree.#2021-08-1920:23practicalli-johnnyCan you run node -v in an Emacs shell?#2021-08-1920:35Drew Verleeyep. thats a good sign#2021-08-1920:36Drew Verleeis there a gobal dir-locals file by any chance?#2021-08-1920:37practicalli-johnnyNot that I am aware of.#2021-08-1920:39practicalli-johnnyBut there is an alternative per directory file, dir-locals-2.el, but I suspect that's not helpful#2021-08-1920:42practicalli-johnnyI assume you could have a dir-locals.el file in the root of your user directory, but any dir-locals.el file in any sub-directory would be used instead.#2021-08-1921:20Drew VerleeThanks. The offending configuration problem was coming form my emacs-custom-settings what ever that does.#2021-08-1921:21Drew Verleei mean its clear what it does, i have no idea how i it got updated to contain that configuration such that it stuck around.#2021-08-1921:26Drew Verleei just removed it because it seems to be auto generated.#2021-08-2203:14didibusAnyone know what spacemacs-default-map-root-map is?#2021-08-2203:14didibusIt seems it brings a binding I want to override, but I can't seem to figure out how to override it#2021-08-2204:09didibusSeems to be created dynamically by bind-map#2021-08-2708:47WestIs it just me? Or is spacemacs getting smoother and faster?#2021-08-2709:42practicalli-johnnySpacemacs has always been smooth and fast for me. I did add a could of Emacs performance tweaks to the config a couple of years ago.
LSP did slow things down a bit in the early days, but is not an issue now (more optimization in the Clojure server process and switching off unwanted IDE features)
There are continuing updates to Spacemacs and Emacs thought, so it's worth running a fairly recent Spacemacs commit and Emacs 27 (or 28)
It also depends what your are using Spacemacs for and how many really long lines are in the files you open.
For example, Emacs 27 did greatly improve the speed of JavaScript files and there are many features focused on enhanced performance.#2021-08-2809:03WestI noticed that when scrolling in Clojure buffers, even with LSP on, I have no problems.
Earlier, if I went passed 100 lines (~80ch width), I would start to feel it. Almost unusable at >200 loc.
It was even slow on 28 with native-compilation.#2021-08-2809:04WestReally grateful for the work done on the Clojure LSP.#2021-08-2809:14WestThe only weirdness Iāve been having recently is that saving hangs emacs.
I used to just save and I could still do other things, but now I have to wait up to a second or two after I save a Clojure buffer.#2021-08-2809:19practicalli-johnnyIssues are predominantly from changes in Emacs packages.
I haven't spent any time analysing performance from within Emacs, but it seems quite detailed
https://practical.li/spacemacs/install-spacemacs/troubleshooting.html#profiling-emacs#2021-08-2913:43Drew VerleeCan anyone advice on what these errors mean and how to fix them?
error in process filter: forward-sexp: Scan error: "Containing expression ends prematurely", 5, 6
error in process filter: Scan error: "Containing expression ends prematurely", 5, 6
Error in 'cider-repl--state-handler': (scan-error Containing expression ends prematurely 5 6)
#2021-08-2916:21Westno idea what these could mean
Can you provide some information on how to replicate these errors?#2021-08-2916:21practicalli-johnnyIs the error caused by the Clojure code or by the code in the Cider package?
Try run your code in a terminal REPL without Cider to identify#2021-08-2916:23practicalli-johnnyMy guess is that there is something wrong on the Cider code, or the compiled .el files.
You could try the scorched earth approach and delete the Cider package or just it's .el files and restart Emacs to download them again#2021-08-2916:24practicalli-johnnyOr it could code be the Clojure code with unbalanced parents somewhere...#2021-08-2916:26practicalli-johnnyIf this error is happening over multiple Clojure projects, then it's probably a Cider package.
If it happens just in one and also in the terminal REPL, then it's the Clojure code unbalanced (or wrong in some other way).#2021-08-2920:06Drew VerleeIt is happening over multiple clojure projects.#2021-08-2920:18Drew Verleeactually it seems to happen related to other tools:
File mode specification error: (scan-error Containing expression ends prematurely 5 6)
[persp-mode] Error: Can not autoresume perspectives -- (scan-error Containing expression ends prematurely 5 6)
command-execute: Buffer is read-only: #<buffer spacemacs>#2021-08-2920:36Westthese errors seem so erratic it leads me to believe it could be one of two things
1. Thereās a missing parenthesis somewhere in your config
2. Your spacemacs installation is corrupted
In this case I would check your config to make sure there were not breaking changes.
If your config looks alright, then reinstalling spacemacs usually does the trick.#2021-08-2920:37WestIf youāre on emacs-28 with gccemacs a.k.a native-comp, then you can delete some packages and force them to recompile.#2021-08-2920:47Drew VerleeI reinstalled emacs seems to work#2021-08-2920:48Drew VerleeI was going to do a fresh config next and just layer in my changes but it seems I didn't need to#2021-08-2920:55practicalli-johnnyProbably a bad package or a corrupted .elc file#2021-08-3108:23practicalli-johnny@drewverlee I think you were experiencing this magit issue, with it not restoring the previous window when not in full screen mode. It seems to be resolved now
https://github.com/syl20bnr/spacemacs/issues/14951#2021-08-3113:27Drew Verleethanks for the insight!#2021-08-3115:06WestIām trying to figure out how to configure a custom modeline. It works, but I want to add cursor line and column indicators.
(with-eval-after-load 'doom-modeline
(doom-modeline-def-modeline 'my-modeline
'(workspace-name window-number modals persp-name buffer-info matches remote-host vcs)
'(misc-info repl lsp))
(wildwestrom/setup-custom-doom-modeline))
How might I do this? doom-modeline-core.el has a bunch of variables I can put in, but I donāt see anything for line or column numbers.#2021-08-3115:11WestNevermind, turns out all I had to do was simply add line-number to the list.#2021-08-3115:57Weststill though, how could I have figured that out other than by guessing?#2021-08-3117:38ericdalloDebugging doom-modeline code :/#2021-09-0216:36WestOk, now it seems to be erroring on startup.
(Spacemacs) Error in dotspacemacs/user-config: line-number is not a defined segment#2021-09-0216:37ericdalloyou can M-x toggle-debug-on-error#2021-09-0216:38ericdallowhich will show a detailed stacktrace when the error happens#2021-09-0217:26WestI didnāt know about this, thank you! @UKFSJSM38#2021-09-0218:35practicalli-johnnythere are some strange names for modeline parts, perhaps its buffer-position (but thats just a guess)
some other names for components I found while searching the internet - I dont use these and I think the checker has a bug, so I use what ever the LSP icon is
;; checker = flycheck results (not working)
;; buffer-position
;; word-count - number of words in current buffer
;; parrot
;; selection-info
;; repl - shows status of Cloure repl ?
;; process ??
;; debug
;; misc-info - used for keycast
#2021-09-0218:36ericdalloI added the support for the repl one š
it shows a terminal icon (the closest icon for a repl that I found) which is yellow when the repl is not connected and green when it's connected#2021-09-0218:37ericdallo#2021-09-0218:39ericdalloMy current modeline is from left to right:
LSP code actions / LSP warnings/errors/info in the project / LSP connected (the rocket one) / REPL / checker#2021-09-0415:15West@U05254DQM buffer-position seems to work
and itās here! https://github.com/seagle0128/doom-modeline/blob/749e860d4e18e67846b6a3ae2826fdad6abb839a/doom-modeline-segments.el#L1646#2021-09-0415:34practicalli-johnnyNice. Lots of doom-modeline-def-segment to look at and see if I wan to include š Thanks.#2021-08-3115:11WestNevermind, turns out all I had to do was simply add line-number to the list.#2021-09-0216:36WestOk, now it seems to be erroring on startup.
(Spacemacs) Error in dotspacemacs/user-config: line-number is not a defined segment#2021-09-0316:24WestAny idea what function allowed me to delete a line (`d d`) and have my parentheses still be balanced? I switched from ivy to helm a little bit ago because performance was better, but now I miss this feature when editing clojure.
I switched back to ivy again, but the feature is still gone. Then I reinstalled spacemacs, so installed all packages and recompiled, but itās still gone.#2021-09-0317:01zanePerhaps https://github.com/luxbock/evil-cleverparens?#2021-09-0317:16practicalli-johnnyYes, evil-cleverparens makes Vim bindings respect the Clojure structure
, T s to toggle on / off#2021-09-0317:17WestAh, when I toggle it the functionality is back!#2021-09-0317:17WestNow I just have to figure out why itās not on by default.#2021-09-0317:19practicalli-johnnyYou could add this to your .spacemacs in the dotspacemacs/user-config section
(spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hooks)
#2021-09-0317:19practicalli-johnnyOr if its just for Clojure :woman-shrugging:
(spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hook-clojure-mode)
#2021-09-0415:00WestI do have this in my user config: (spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hooks).
Unfortunately that has no effect in any lisp buffer. When I try to describe, SPC h h, it says itās in ../init.el, but it isnāt. First it says the file doesnāt even exist. Then it takes me to my spacemacs folder, (usually ~/.emacs.d), but the function is not there.#2021-09-0415:17WestActually, I canāt seem to find this function defined anywhere.
Edit: Nevermind, itās here: layers/+spacemacs/spacemacs-evil/packages.el
So thatās strange, it wonāt activate on startup. Maybe Iāll need a workaround.#2021-09-0415:23practicalli-johnnyI get evil-cleverparens via the Clojure layer. Although it can also be added as a layer itself https://www.spacemacs.org/layers/+vim/evil-cleverparens/README.html#2021-09-0415:33WestOk, I think Iāve solved it. It must have been related to the previous error of line-number not being defined.#2021-09-0415:54WestNow I know that one error can cascade into many.#2021-09-0415:54WestNow I know that one error can cascade into many.#2021-09-0614:51paulspencerwilliamsHi. Can anyone advise how I can advise how I can ensure Emacs interprets p when debugging as an inspect command, rather than an Evil paste?#2021-09-0615:40practicalli-johnnyC-z will toggle between Evil (vim) and Emacs editing modes.#2021-09-0615:45practicalli-johnnyhttps://practical.li/spacemacs/debug-clojure/cider-debug.html#2021-09-0615:46practicalli-johnnyThere is code in Spacemacs to switch key bindings when going into cider-debug mode, unfortunately this code hasn't worked for some keys (stated in the above article)#2021-09-0616:15paulspencerwilliamsOh yeah, Iād read that page twice today and didnāt pick up on that section. Selective blindness. Cheers#2021-09-2208:27jumarShout to to @jr0cket for great spacemacs docs - This morning I found this piece about layouts and workspaces which has been very useful: https://practical.li/spacemacs/spacemacs-basics/working-with-projects/layouts.html#2021-09-2209:23practicalli-johnnyThank you. I use a layout for each project I work with which keeps a nice separation of actions between projects. I think I have about 20 layouts at the moment.
I can easily switch between current and last project with SPC l TAB and switch between buffers of the current project with SPC TAB
TIP: if you have lots of layouts and each layout has lots of buffers (or a huge buffer like the spacemacs changelog.md) then this does slow the startup of Spacemacs a little as it opens all these buffers (although I rarely have to restart Emacs)#2021-09-2506:51Martynas MThis is seriously cool. I didn't understand what it tries to achieve at first but after fiddling with it I understood.
What it does is it allows to save window states (and sizes, positioning and so on) so that if you want to run tests for one part of the project then you can do it in one layout.
And if you want to edit a diagram and see it side by side then you can have one more layout where you have your diagram files open in the sizes that you prefer.
This is great!#2021-09-2616:13naomarikthere a quick way to completely get rid of all treemacs keybindings?#2021-09-2620:44practicalli-johnnyRemove the treemacs layer will get ride of it all
Otherwise I think you will have to over-ride each key binding or set each one to nil.
Or, copy the treemacs layer into a private layer and delete all the key bindings#2021-09-2706:26stagmooseHas anyone tried symex.el before https://github.com/countvajhula/symex.el#installation
I put
(use-package symex
:config
(symex-initialize))
in my user-config, and type in M-x symex-mode-interface and nothing happened š
#2021-09-3016:40alexdavisToday for some reason I started getting apply: Symbol's function definition is void: parseclj-alist when starting a cljs repl. Iām pretty sure parseclj is installed, and canāt think of any reason why it would suddenly become uninstalled#2021-09-3016:50practicalli-johnnyI saw a parseclj issue when I updated the Cider package yesterday. I restarted Emacs after the package install and didn't see the error again.
I didnt try and diagnose this as I believed its just Emacs trying to find something it doesnt know about yet.
If restarting doesnt work, try delete the Cider package and restart, to download and install a new version of the package. Or try just deleting the .elc file.#2021-09-3016:51practicalli-johnnyThere may be some other ideas here https://practical.li/spacemacs/install-spacemacs/troubleshooting.html#2021-09-3016:51alexdavisOk thanks, I already tried restarting and reinstalling the parseclj package. doing an update of cider now#2021-09-3016:52alexdavisparseclj-lex--leaf-token-value: Symbol's function definition is void: :number Well at least its a new error š
#2021-09-3016:53practicalli-johnnySomeone else is getting the same error in #practicalli channel#2021-09-3016:56practicalli-johnnyI updated about 30 package yesterday, so could be any of those. I assumed it was Cider as it had clj in the name.
I also updated the Spacemacs code as well.
If a package has changed its API, then they may be a fix in a newer commit of Spacemacs#2021-09-3016:57practicalli-johnnyI am not getting this error when I jack-in with either Clojure of Clojure script#2021-09-3016:40alexdavisany tips on how to debug this?#2021-09-3018:07lreadProbably related to this?#2021-09-3018:08lreadIf so updating your packages should fix.#2021-09-3018:11murtaza52Yup I just did that, still doesnt work ...#2021-10-0107:15jumarWhen I do "search project" (SPC /), type some pattern (or just press SPC * at the beginning),
then I would like to filter the results only coming from certain subdirectory - like SPC s f but specifying the directory only after the search pattern.
Is there an easy way to achieve that?#2021-10-0108:25practicalli-johnnyIf using ripgrep (and probably silver-searcher) exclude a file or directory with the -g!directory-name option at the start of the search prompt
For example, to search for uses of the pattern token but avoid searching in a directory called customer-token within a project tree, I would use SPC / to start the project search and type -g!customer-token token . This will list all the files that have the pattern token except for files inside the customer-token directory.
https://practical.li/spacemacs/spacemacs-basics/working-with-projects/searching-projects.html#searching-specific-files#2021-10-0114:44jumarThanks, John, a really good answer.
I'm in fact interested in including a directory, not excluding it.
But it's very similar to what you said - I just need to specify a proper glob like this -gmy-dir-name/** search-pattern#2021-10-0115:10practicalli-johnnyAh yes the /** is needed when including a specific directory and removing the ! of course
-gcompany-token/** token from my earlier suggestion.
I think the /** is supposed to be used when excluding a directory too, although it seemed to work without okay.#2021-10-2222:30Drew Verleewhat is the key binding s-l ?#2021-10-2222:30Drew Verleehttps://emacs.stackexchange.com/questions/55199/what-are-these-prefix-commands-that-start-with-s-l#2021-10-2222:32Drew Verleethe super key. What kind of pretentious key would call itself that. I can just see it getting bullied at school.#2021-10-2305:29practicalli-johnnyIf anything in Emacs was bound to to key combo that included the 'super' key, I would rebind it.
I haven't seen that problem though with Spacemacs.
I think of the 'super' key as the Operating System key, as I use it to drive the OS desktop commands commands.
I usually put an OS specific sticker on my keyboards, especially if a keyboard has an incorrect OS logo on the key.#2021-10-2520:06Drew VerleeWill magit allow you to assign commit pieces (hunks, buffer, whatever) to a branch that your not currently on? I have been watching someone do this in intelliji and it seems very useful for getting small pieces of work done.#2021-10-2523:27practicalli-johnnyCurious. I usually stash changes and change to or create a new branch.
There is also (magit-branch-spinoff) which will create a new branch from the unique community of the local current branch (resetting the current branch to be the same as the shared/upstream branch)#2021-10-2523:39practicalli-johnnyI haven't noticed a way to specify a different branch when creating a new commit. I didn't find anything in a quick search, so would be curious if there is a way.
Not sure how I would do this using git commands directly#2021-10-2523:48practicalli-johnnyI can't even find an example of how to do a new commit to another branch with intellij.
If it's an existing commit on a branch, then it can also be cherry picked (which seems very simple on magit).
Otherwise, I am unsure how to avoid staging and changing to another branch (unless it's a new branch where there aren't any constraints to changing a branch)#2021-10-2602:44Drew VerleeThanks for the reply. In intelliji i believe he was using a "change log" feature but then somehow that got tied into git. Then maybe it was cherry picking? I'll ask him to explain more next time.#2021-10-2610:34practicalli-johnnyI wonder if this could also be done with commit hooks, maybe a post-commit hook :woman-shrugging:#2021-10-2906:57jumarI often use SPC / instead of projectile-find-file because it's faster.
How come that a fulltext search is faster than finding a file by a file name?#2021-10-2907:01jumarAnother question related to docs - I use Shift-K quite a bit to show docs (it's the same thing as , h h)
But a while ago it started prompting me for a symbol every time - I just press Enter, but it's still annoying.
Is there some kind of configuration setting I should tweak?
Can I have a doc popup shown, perhaps on a keypress or automatically after some delay?
(I'm using latest develop and cider if that matters but I had an older version for quite a long time and the behavior was the same)#2021-10-2908:29alexdavisI believe projectile-find-file uses find and SPC / uses rg or ag which are both much faster. Thereās some docs on how to use something other than find I think https://practical.li/spacemacs/before-you-start/recommended-command-line-tools.html#finding-files-faster#2021-10-2908:30alexdavisShift-K works without prompting for input for me on latest develop, so not sure about that sorry#2021-10-2909:14practicalli-johnny@jumar I assume the help (S-K or , h h) requires a running REPL connection and at least one namespace being evaluated to load Clojure into Cider. I havent always found cider docs 100 reliable though.#2021-10-2909:18practicalli-johnnyI havent noticed any slowness using SPC p f . I wonder if it slows down on bigger projects or if projectile is using a wider scope than the current project. I use layouts to manage all my projects as well, not sure if that has any effect.
If on a Linux system and have updatedb installed, then there is the command helm-locate (`SPC f l`) that will very quickly find a file across your filespace.#2021-10-2912:49jumarTried this SPC f L thing but it doesn't work on my macOS:#2021-10-2912:49jumarTried this SPC f L thing but it doesn't work on my macOS:#2021-10-2914:34practicalli-johnnyIt seems the -b option is missing from the locate command in the FreeBSD OS that MacOSX is based on.
I thought the OSX layer may have fixed this, but I didnt find anything in the https://develop.spacemacs.org/layers/+os/osx/README.html
Might need to hack the spacemacs code to fix it.#2021-10-2914:36practicalli-johnnyA quick search of the OSX layer and it seems mdfind is used instead of locate
(defun osx/pre-init-helm ()
;; Use `mdfind' instead of `locate'.
(when (spacemacs/system-is-mac)
(spacemacs|use-package-add-hook helm
:post-config
;; Disable fuzzy matchting to make mdfind work with helm-locate
;;
(setq helm-locate-fuzzy-match nil)
(setq helm-locate-command "mdfind -name %s %s"))))
So if the osx layer is added to spacemacs, it may fix helm search (I dont have a mac so cant test I am afraid)#2021-10-2915:52jumarThanks Iāll give it a try on Monday #2021-10-2912:46jumarThank you both, super useful!
I thought it might be the view itself that makes it slower as I'm typing in the string to narrow down the search for projectile.
I have a somewhat larger project (monorepo) so there many files but nothing dramatic.
I've just installed fd and I think it's faster.
For docs - I have a running repl and after I do Shift-K, Enter it works but the midstep is annoying.
The xtra window is a bit distracting too - does somebody have/use "(auto-)popup docs" ?#2021-10-2914:23practicalli-johnnyUsing Emacs lsp-ui (with Clojure-lsp server) has a feature to pop-up docstrings either on mouse or cursor, with a pop-up delay too.
https://emacs-lsp.github.io/lsp-ui/#lsp-ui-doc#2021-10-2914:39practicalli-johnnyIf there are file patterns that you dont want to see when searching a project (but do want to commit into git), you can add them to a .projectile file in the root of the project
https://docs.projectile.mx/projectile/projects.html#ignoring-files
If the file patterns are not going to be committed, then add them to the .gitignore file in the root of the project and projectile should ignore them.#2021-11-0113:41paulspencerwilliamsSo, Iāve been bouncing between Spacemacs and my own Emacs setup. Iām back in the Spacemacs camp and am looking for a way to configure it to trust variables in my various .dir-locals.el files such as
((nil . ((eval . (progn (setenv "CODE_PROFILE" "dev")
(setenv "JAVA_HOME" "/Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home"))))))
Vanilla Spacemacs prompts to apply these, but choosing the persistent ! causes these trusted values to be written in ~/.spacemacs in dotspacemacs/emacs-custom-settings which is undesirable as I commit this to git.
Is there a recommended approach to handling this situation, or is my .dir-locals.el to blame - requiring trusting?#2021-11-0117:45practicalli-johnnyI have the trusted variables in the .spacemacs file as usual, I just do not check in any of the custom-settings section of that file.#2021-11-0118:10paulspencerwilliamsOh, thatās a pretty pragmatic and simple solutionā¦#2021-11-0322:09Kira McLeanI have a somewhat random and very environment specific question but hoping Iām just missing something obvious.. Iām wondering how to make emacs automatically/always aware of $JAVA_HOME.. I use jabba to manage JVMs, and $JAVA_HOME is set by default in any new terminal I run, but emacs (spacemacs) is unable to locate a Java runtime by default, until I set it manually#2021-11-0408:53practicalli-johnnyThe Jabba readme says it changes the RC file of the shell. So I assume it sets JAVA_HOME to a specific install of Java.
Running Emacs command from the terminal should pick up the JAVA_HOME environment variable.
However, if running Emacs from a desktop launcher (dock/menu), then I assume the .profile file for your OS account must source the RC file, e.g ~/.bashrc#2021-11-0408:57practicalli-johnnyIf JAVA_HOME is changed when Emacs is running, then try reloading environment variables using SPC f e E
Note that any running Clojure REPL will need to be restarted (stop/start) to pick up changed environment variables#2021-11-0411:26WestIāve always used jenv. You can set a local jvm version per directory with a .java-verison file. Emacs (as well as other editors) seems to respect it.#2021-11-0522:01Kira McLeanthis is helpful, thank you!#2021-11-0409:22jumarIs there an easy way to switch key-value pairs in a map?
Like sp-transpose-sexp but for key-value pairs, not just single thing.
E.g. to go from {:a 1 :c 2} to {:c 2 :a 1} via a single keystroke#2021-11-0417:35Martynas MAnd what if you'd have {:a 1 :b 2 :c 3} ?#2021-11-0420:06lreadFWIW, there is a drag feature in Calva which kinda sorta sounds maybe related? https://calva.io/paredit/#drag-bindings-forwardbackward#2021-11-0507:04jumar@U028ART884X sorry if my example was confusing.
I want to be able to switch order of adjacent key-value pairs.
So for example (`|` is the position of my cursor)
{:a 1 ... :x 10 | :y 11 :z 100}
would be transformed to
{:a 1 ... :y 11 :x 10 :z 100}
by this mysterious emacs function.#2021-11-0507:05jumarThe same for let bindings as @UE21H2HHD demonstrated with the Calva feature#2021-11-0417:49Martynas MIs there a way to fix treemacs not displaying git changed file colors? Or is it a bug?#2021-11-0913:29murtaza52I use clojure-align for formatting clojure forms.
1. I have a codebase in which I want to align all the functions, can I run clojure-align on all source files (instead of manually opening each one, selecting all the forms and running it) ?
2. Is there an external tool which will allow me the same formatting ? I tried cljfmt and cljstyle but they dont support all the formatting that clojure-align does ?
#2021-11-1419:09Drew VerleeMy advice is to let your dream of aligning forms die. As only 20% of the clojure ecosystem gets behind the idea you will constantly be fighting up hill. E.g if you touch a map and all the forms will align ppl will be upset because now your git change is far to large. If you ignore whitespace, then sometimes you will accidentally commit unaligned rows.
I enjoy aligned args, but its not worth the effort.#2021-11-1419:09Drew VerleeI'm going to see how i can turn it on and off on a per project basis at least.#2021-11-1217:31Drew VerleeI run "magit-log:-G" from what i think is helm and i get "helm-M-x-execute-command: Wrong type argument: (or eieio-object class), nil, obj [2 times]" any idea why?#2021-11-1217:43practicalli-johnnyYes, I get the same thing if I just run SPC SPC magit-log:-G
What should this function be doing?#2021-11-1217:44practicalli-johnnyOh, looking at the code it seems to be a transient switch to search the Git log by changes. Although i am not sure what that means, because isnt everything in the log a change?
Is this something just for the magit-status buffer when viewing the log?#2021-11-1217:49practicalli-johnnyHmm, I get the same error when using SPC SPC magit-log:G in the log view of the magit status buffer too..#2021-11-1218:02Drew VerleeI assumed it should show me the log in graph form. I can get that another way, so not a big deal#2021-11-1218:02practicalli-johnnyAh, that is the -g option, the -G lets you search through the log#2021-11-1218:03practicalli-johnnySo if you go into magit status buffer, SPC g s and then press l for the log menu, you can type -g as the option to show the graph#2021-11-1218:13practicalli-johnnyThen use the b option to show all branches and it will show the log in a buffer with the commit graph#2021-11-1218:14practicalli-johnnyThe -g toggle will stay enabled until its toggled off again.#2021-11-1218:18practicalli-johnnyI like the -g -d and -c options for the log, then show the log with b for all branches or a for all references.#2021-11-1218:19practicalli-johnnyThe toggles only seem to stay in place if calling the log from the magit-status buffer. If using magit-log from the source code buffer it seems they need to be toggled each time.#2021-11-1218:24practicalli-johnnyPerhaps the https://magit.vc/manual/magit/Transient-Arguments-and-Buffer-Variables.html can be used to set these toggles on outside of magit-status, but I dont fully understand this doc.#2021-11-1419:07Drew Verleethanks john. that works#2021-11-1419:10Drew VerleeWhats the emacs way to set local envs on a per directory/project basis?#2021-11-1419:12Drew Verleethough i feel like im doing something else wrong then.#2021-11-1419:20Stas Makarovhttps://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html#2021-11-1617:06Drew Verleethanks. ill i had come across that before but didnt' think it delt with envs, ill give it a re-read though as its whats google is returning to.#2021-11-1617:26Drew VerleeGiven i'm in a clojure file, with shadow-cljs running, and a require [re-frame.core :as re-frame] if i type re-frame/` then hit tab i would want it to suggest all fpublic unctions in the re-frame namespace. I feel like in some contexts, such as my small clj projects, this works constantly. In others, work cljs projects, i see it once and a while. I'm trying to imagine what set of functionality (cider, lsp, emacs) is involved to know if i can get it working more often then not#2021-11-1617:52ericdallousually the completion comes from cider (runtime) or lsp (static), you need to check which one you have enabled#2021-11-1617:52practicalli-johnnyMy thought would be to focus on getting it to work consistently with LSP, although I do not know how#2021-11-1617:52ericdalloit should work consistenly on lsp, unless a bug that I'm not aware#2021-11-1617:53ericdalloI'd suggest confirm you are using only completion from LSP and not using cider one#2021-11-1617:53ericdalloI have this workaround on my config:
(add-hook 'cider-mode-hook (lambda () (remove-hook 'completion-at-point-functions #'cider-complete-at-point)))
it forces remove cider completion, not sure there is a better way though#2021-11-1623:33Drew VerleeI added that to my spaceamcs init file user-config section and still get "no matches". Do i need to enable it somehow? I'm trying to figure out what gets run when i it tab to try to get matches.#2021-11-1623:42ericdalloFirst we need to confirm if the comet ion is using only LSP or any other backend#2021-11-1623:42ericdalloCheck the value of your completion-at-point-functions#2021-11-1701:31Drew Verleecompletion-at-point-functions is a variable defined in 'minibuffer.el'.
Its value is
(forge-topic-completion-at-point elisp-completion-at-point t)
Local in buffer minibuffer.el.gz; global value is
(tags-completion-at-point-function)
#2021-11-1701:33Drew Verleelsp-completion-mode is a variable defined in ālsp-completion.elā.
Its value is t
Local in buffer learning_stream_card.cljs; global value is nil
Automatically becomes buffer-local when set.#2021-11-1722:02Drew Verlee@UKFSJSM38 here is the output from company-diag, is that the correct place to look?
Emacs 27.2 (x86_64-pc-linux-gnu) of 2021-11-05 on lgw01-amd64-028
Company 0.9.13
company-backends: ((company-capf :with company-yasnippet)
(company-semantic company-dabbrev-code company-gtags company-etags company-keywords :with company-yasnippet)
(company-files :with company-yasnippet)
(company-dabbrev :with company-yasnippet))
Used backend: (company-semantic company-dabbrev-code company-gtags company-etags company-keywords :with company-yasnippet)
Major mode: clojurescript-mode
Prefix: stop
Completions: none
#2021-11-1722:04ericdalloI'm no emacs completion expert but this is not related with company I think but the completion-at-point-functions which tell what are the completion source#2021-11-1722:05ericdalloyour company config looks correct to me, what we need to know is the completion-at-point-functions variable value in a clojure buffer with lsp and cider connected#2021-11-1722:05Drew Verleei pasted that to, above, though i'm still learning how to read the output. it's not simple#2021-11-1722:05ericdallofrom your output it seems to me you were not in a clojure buffer:
(forge-topic-completion-at-point elisp-completion-at-point t)
#2021-11-1722:07Drew Verlee#2021-11-1722:08ericdalloHum :thinking_face: this is mine:#2021-11-1722:08Drew Verleewhat emacs setup do you use?#2021-11-1722:09ericdallodoom-emacs, I'm not familiar how spaceemacs configure completion functions#2021-11-1722:09Drew Verleewhy did everyone jump on that banwagon lol#2021-11-1722:09ericdallohahaha doom-emacs is awesome IMO :)#2021-11-1722:28Drew VerleeYea, i might make the switch if it ends up getting more support. I'll wait for practicalli to go first though š#2021-11-1722:29Drew Verlee^ regarding the above comment i'm guessing the clojure spacemacs layer should be updated to use lsp by default on cljs? I'm guessing nothing is curently set and it uses cider on the backend.#2021-11-1800:33practicalli-johnnyI haven't noticed Cider backend being used for ClojureScript as default. Using Cider as the backend means LSP doesn't run at all and I am sure I was getting prompted to analyse the last ClojureScript project I opened a few weeks ago.
All programming language layers were changed to LSP backend by default (that was the goal of introducing LSP in Spacemacs).
It's more likely that there are a few tweaks that could be identified and added.
If you have a project you can share, let me know. Or raise an issue on the Spacemacs repo.#2021-11-1802:02Drew VerleeIs the completion working for your projects?#2021-11-1802:03Drew VerleeI guess I'm not sure what more to share in terms of diagnostics. It doesn't work in most cases, i think when it is, it's because those completions are used in the file already.#2021-11-1722:29Drew VerleeI hate to think doom emacs has more clojure support then spacemacs!#2021-11-1722:32ericdalloYeah, I already noticed some missing tunes on spaceemacs last time I checked regarding lsp + clojure#2021-11-1822:36Drew Verleedo you know who or where that's maintained?#2021-11-1822:37ericdalloI'm not sure, doom has modules maintianers, I suppose spaceemacs has something like that?#2021-11-1822:38ericdalloMaybe check on the GitHub last people that committed there on that layer#2021-11-1723:16Drew Verleeit's odd the layer docs doen't link to the code https://develop.spacemacs.org/layers/+lang/clojure/README.html. here it is https://github.com/syl20bnr/spacemacs/tree/develop/layers/+lang/clojure#2021-11-1800:32ericdalloIMO the LSP should be enabled by default like doom, but is just my opinion hehe#2021-11-1800:34ericdalloAlso, I see to few mentions on LSP features, maybe the docs should mention that with LSP you win limiting and a lot of other things the docs are recommending to install that are already built-in on LSP :man-shrugging:#2021-11-1800:36practicalli-johnnyLSP is enabled by default in the Clojure layer (all prog Lang layers) A layer variable (or setq) is required to revert back to Cider (and ensuring LSP doesn't run)#2021-11-1800:37ericdalloOh, I see#2021-11-1800:37ericdalloSo there is no way to have cider + LSP?#2021-11-1800:37ericdalloThey have some conflicts like completion and navigation but besides those, I think pretty much everything works fine together#2021-11-1800:38ericdalloI use that setup for myself#2021-11-1800:38practicalli-johnnyCider backend is just Cider, no LSP.
LSP backend is LSP + Cider#2021-11-1800:43practicalli-johnnyIf it's just the Cider backend, then LSP is not run when a project is open. So LSP doesn't prompt to analyse a new project and none of the LSP specific keybindings are there.#2021-11-1800:47practicalli-johnnyI'll check again my ClojureScript projects, but fairly sure they are running LSP.
Doom might have some additional custom config to make Clojure and LSP work nicely that isn't in Spacemacs, but LSP should be the default for clj, cljc and cljs.#2021-11-1800:08Drew Verleehere are my LSP completion group vars. First thing i noticed was that my lsp-completion provider value is t as where the docs here suggest the default is capf#2021-11-1800:10Drew Verleei'm guessing thats relevent š#2021-11-1800:23Drew Verleeapprently auto complete works in some namespaces, for some required namespaces.#2021-11-1801:00practicalli-johnnyI do experience some intermittent issues with LSP and completion, although I only really notice it for snippets. I'll try find some time to create a code repo with reproducible issues and raise it as a bug on the Spacemacs GitHub repo.
It would be useful to try reproduce issues with just LSP running and then LSP and a repl process running to see if there are differences#2021-11-1803:52Drew Verleecompletion works on a smaller project for me.#2021-11-1823:26Drew Verleecompletion is just as random and spotty on doom.#2021-11-1823:28Drew VerleeI tried like 5 namespacs and sometimes things compelted, sometimes they didnt. Sometimes if i change the alias they would work. Sometimes if i used the fully qualified ns it worked.#2021-11-1906:59practicalli-johnnyI'll be refactoring some Clojure code today and adding some new namespaces, so should give the completion a nice little workout.
I'll first download the latest clojure-lsp server and update all the Emacs packages (and Spacemacs config).
If there are issues across Emacs configs (i.e. Doom, Spacemacs) then it suggests some feedback to the LSP projects is required, so I'll try create a project with reproducible issues.#2021-11-1914:45Drew VerleeThanks john, i'll try to do the same. The hard part here is always it works flawlessly on my toy projects and only intermittently on the larger ones. And in the larger ones, that i can't share, i'm not sure how to report the relevant information! I think i want to learn more about emacs internals and elisp, need some sort of introduction material though. it seems more daunting then clojure thats for sure.#2021-11-1915:21Drew VerleeI have some interesting cases that i think form a pattern around when completion works and doesn't work. I'm on doom right now, but i'm guessing the same thing will happen in spacemacs.
the require for [kyber.utils :as ku] doesn't have completion on ku/ but if i do [kyber.utils :as con] it does work on con/.*
My guess is that con/ works because con triggers at least clojure conj and cons. That is, it finds some set of functions to complete and then finds more the aliased kyber.utils ns as con.
[kyber.utils :as xt] doesnt work but [kyber.utils :as in] does, i believe, bc cljs.core has inc, indexed? infinte, etc...#2021-11-1915:21Drew Verleei'll try this on spacemacs.#2021-11-1915:24Drew Verleewhy this would be, is beyond me, but i'm guessing there is a race condition where if it can't find a completion fast enough it gives up? But if it does find one it keeps searching for more.#2021-11-1917:01practicalli-johnnyMagit forge warning. If you have updated packages in the last 8 days you may have lost the @ forge keybinding. There is now a https://github.com/syl20bnr/spacemacs/pull/15167 that brings the keybinding back again, so pull down the latest develop branch for Spacemacs.#2021-11-2102:40WestWanna see something weird? I just ran my profiler with a stripped down spacemacs config. Scrolling down takes a lot more cpu time than scrolling up. What could be the reason for this?#2021-11-2102:41WestIs there any way to profile at a lower level? Need some more detail as to whatās being called where.#2021-11-2103:04WestTurning off line numbers seemed to do the trick.
That sucks though, because I really like having line numbers.#2021-11-2103:04WestHereās the profiler after turning off line numbers.#2021-11-2103:10WestItās still very strange to me that scrolling down still costs more cpu cycles than scrolling up though. I expect it should be equal.#2021-11-2103:29WestNow hereās what it looks like in gnu emacs with a pretty bare init file.
(setq scroll-step 1
scroll-margin 1
scroll-conservatively 100000)
Iām still baffled as to why scrolling up and down is asymmetric.#2021-11-2103:37WestIām also baffled by just how slow adding line numbers is. Especially visual line numbers. That really makes me sad. I liked to have line numbers on so much, but I just canāt deal with the performance hit.#2021-11-2104:16WestIām not sure. Let me try it.#2021-11-2104:18WestItās still asymmetric even without advancing the screen.#2021-11-2104:56WestI just set my line-numbers-width to 3 and itās still slow as hell.
Using emacs 27.2, but this problem also exists on emacs-28 and higher as well.#2021-11-2222:09agThere are tons of tiny things; separately, each may look rather insignificant. When they are pulled in all at once, it becomes a problem.
See, for example: hl-line - it works fine in Linux, on a Mac it slows down things, just enough to see the difference. which-key sometimes adds almost 30% overhead - especially if used in posframe mode. CIDER adds more things that increase latency. if you use lsp-mode - that too.
I recently switched to Doom (after several years of Spacemacs) because I felt tired hunting down every single hook, advice, and feature that doesn't add significant utilitarian value for me. Spacemacs does a lot.
Doom has its own problems, and switching to it wasn't completely smooth and painless for me. I wouldn't recommend switching to Doom if you already invested in Spacemacs.
If you want performance - hunt down every single thing you don't need. Try disabling minor modes. Remove hooks, de-advice functions.#2021-11-2222:16ag> I liked to have line numbers on so much
don't use linum-mode, use built-in (since v27) display-line-numbers-mode instead. linum is too slow#2021-11-2223:04WestI never use linum-mode, spacemacs uses display-line-numbers-mode by default, no?#2021-11-2103:04WestHereās the profiler after turning off line numbers.#2021-11-2113:09practicalli-johnny@c.westrom Scrolling a buffer is not a very efficient with Emacs in general. Page up/down should be faster as is jumping to different locations in the buffer.
There are many ways to configure smoother scrolling for Emacs - https://www.emacswiki.org/emacs/SmoothScrolling
However, its still more efficient to learn how to navigate code rather than scrolling
https://practical.li/spacemacs/navigating-code/#2021-11-2301:56Drew Verleei assume if i press "f" here on "pickup" in a magit rebase the pick should be changed to "fixup" instead, nothing happens.#2021-11-2303:07Drew Verleeapparently this is a known issue. one workaround seems to be to manually entre rebase mode.#2021-11-2303:40Drew Verleewhen your done with that rebase prompt, how do you continue? i would expect there to be some instructions about how to "continue" with the rebase. If i try magit-rebase-continue it tells me some nonesense.#2021-11-2303:42Drew Verleehmm maybe the nonsense was something i did though. lets try this again#2021-11-2309:58practicalli-johnnyWhen in doubt, I press r to continue when the rebase is back in the magit-status buffer. Not sure if that was what you were asking (apart from wanting f to work š )#2021-11-2318:12Drew VerleeYep, pressing r to get the rebase options makes sense. I would just like it to be a bit guided of an experience i suppose. The big deal is that the rebase buffer loads as in "insert mode" one work around is pressing Ctrl-Z to switch in and out of the insert mode and to the correct mode#2021-11-2318:23practicalli-johnnyI assume the magit rebase buffer needs to be evilified as is already done to the magit status buffer.
Sounds like an issue feature request on the Spacemacs repo.#2021-11-2402:33Drew VerleeI believe it was that way before, and now isn't for some reason. I recall not having this behavior a year ago. I started reading the ticket about i quickly lost the thread of why :-/
new topic. is the functionality to create a gist that comes with the github layer working for you? (anyone reading) should be
> SPC g g b to create a Gist from the current buffer.
(it's not for me in case that isn't obvious).#2021-11-2507:11practicalli-johnny@drewverlee creating a gist from a buffer or region has worked for me (it's been a few months though)
Ensure a GitHub personal token is added to the ~/.gitconfig file and that token was created with repo and gist permissions (if not sure, delete the token and create a new one).
I'll do a quick check of SPC g g b next time I'm at a computer#2021-11-2708:11practicalli-johnnyIt seems that Gist has been removed from the GitHub layer, so I suspect there is some issue with recent package or spacemacs versions. Or maybe the gits API changed. I'll try find out more, at gisting a buffer was very handy..#2021-11-2712:13practicalli-johnnyAdding the gist package to dotspacemacs-additional-packages in .spacemacs (or .spacemacs.d/init.el) and restarting Spacemacs, I can use gist-buffer command to successfully create a new gist.#2021-11-2712:48practicalli-johnnyAccording to one of the Spacemacs maintainers, the gist.el is broken, however, it seems to work so far...#2021-11-2713:43practicalli-johnnyWhist gist-buffer works, when trying to view a file from the gist-list list, it hangs Emacs badly, so I assume this is why the gist.el package has been removed from the github layer.#2021-11-2714:07practicalli-johnnyI've updated the GitHub Gists page on Practicalli Spacemacs to highlight the removal of gist.el from the GitHub layer
https://practical.li/spacemacs/source-control/github/gists.html#2021-11-2800:46Drew VerleeThanks john. I found the gist option really useful for sharing, I'll need to come up with something else if i can't get it working.#2021-11-2714:07practicalli-johnnyI've updated the GitHub Gists page on Practicalli Spacemacs to highlight the removal of gist.el from the GitHub layer
https://practical.li/spacemacs/source-control/github/gists.html#2021-11-2622:45vnctaingHi, Iām trying to have tailwind css intellisense working with hiccup on spacemacs, does anyone know how to hook it up ? https://github.com/merrickluo/lsp-tailwindcss#2021-11-2708:16practicalli-johnnyTry adding lsp-tailwindcss as an additional package in the .spacemacs configuration file
dotspacemacs-additional-packages '(lsp-tailwindcss)
If that doesnt work, try adding the specific recipie#2021-11-2708:17practicalli-johnnydotspacemacs-additional-packages '((lsp-tailwindcss :recipe (:host github :repo "merrickluo/lsp-tailwindcss")))
#2021-11-2708:22practicalli-johnnyRestart spacemacs to download the package. Then follow the instructions to install the server https://github.com/merrickluo/lsp-tailwindcss#language-server#2021-11-3023:13thompenare remote inline images in org mode working for anyone from within spacemacs?
https://orgmode.org/worg/org-release-notes.html
> 1.3.8. Display remote inline images
> Org now knows how to display remote images inline.
> Whether the images are actually displayed is controlled by the new option org-display-remote-inline-images.#2021-12-0105:37practicalli-johnnyI can display local images with SPC m T i to org-toggle-inline-images
I'll try a remote image when I'm next at my computer.
Spacemacs uses the org-mode package from Elpa, so if it's a new feature, then try updating packages or check the org-mode-version#2021-12-0106:19thompenI only saw it working in doom emacs (emacs -q didn't work either). But I think it's doing some additional work related to it.#2021-12-0102:46Drew Verlee@thomascpendergrast how would i check?#2021-12-0105:39practicalli-johnnyI assume it's the same as for a local images, except the filename for the image is a URI
display local images with SPC m T i to org-toggle-inline-images#2021-12-0105:52thompen[[]]
[[
#+BEGIN_SRC elisp
(setq org-display-remote-inline-images 'download)
(org-toggle-inline-images)
(org-mode)
#+END_SRC#2021-12-0105:54thompenPlay around with the different toggles, and make sure org-display-remote-inline-images is set to 'download or 'cached.
You should at least be seeing the local image, cause that does seem to work.#2021-12-0113:02practicalli-johnnyThe org-display-remote-inline-images variable is in Spacemacs (I updated the packages a couple of days ago, not sure when org-mode 9.4 was released).
So in theory it should work. Trying now.#2021-12-0113:22practicalli-johnnyI can display a local image, but the example code block doesnt render a remote image. I am sure I have done a remote image before in a presentation somewhere...#2021-12-0113:39practicalli-johnnyIn the past I have just used SPC SPC org-download-image and that works just fine for me.#2021-12-0114:54thompendo you mean it displayed inside emacs or when exported to html ?#2021-12-0117:40practicalli-johnnyIt display in emacs. Are you asking about something different?#2021-12-0122:21thompenNo, I'm interested in it displaying inside of emacs. I'm just wondering if that was the case when you had a remote image in a presentation.#2021-12-0200:31practicalli-johnnyI was just showing the magic of Emacs https://skillsmatter.com/skillscasts/13276-open-source-your-digital-life-with-emacs
The images make a brief appearance at 10 mins into the video#2021-12-0113:39practicalli-johnnyIn the past I have just used SPC SPC org-download-image and that works just fine for me.#2021-12-0122:04Drew Verlee@jr0cket
From https://practical.li/spacemacs/clojure-projects/project-configuration.html#project-level-configuration
My Space f A isn't reload buffer, and helm doesn't show me a "reload buffer" option if i serach for reload or buffer.#2021-12-0200:07practicalli-johnnyDoh, it should be SPC b R to revert-buffer#2021-12-0200:14practicalli-johnnyBook should be updated soon, sorry for the confusion#2021-12-0200:15Drew Verleety ty#2021-12-0200:11practicalli-johnnyI've refactored the Magit Forge page into separate pages for creating, viewing and updating issues, pull requests and forks. This should make it easier to find the relevant guides. I've also added some screenshots.
I really like being able to do the whole pull request from within Emacs, expecially a projects pull request template is used when you create that pull request, which I find far quicker to edit in Emacs than GitHubs website
https://practical.li/spacemacs/source-control/magit/forge/#2021-12-0804:28Drew Verleeso this really awsesome tooltip will show up about a fn or var, but only if you chill there for like 3 seconds. I don't really have a productive comment here, just that if we could get that down people would love it.#2021-12-0804:30Drew Verleelike i type [clojure.spec.alpha*] where "*'" is the cursor and then magically this how doc shows up about the namespace and im like yea. but it takes so long i probably wont see it before moving on.#2021-12-0804:30Drew Verleei guess if idont know what i need i can afford to wait around lol#2021-12-0813:23practicalli-johnnySounds like the Emacs lsp-ui doc popup, which can be configured with these LSP layer variables in Spacemacs
I believe its the lsp-ui-doc-delay value to tweak to your requirements (the doc popup really annoys me, so I have a long delay - because at some point I couldnt disable the popup)
lsp-ui-doc-enable nil ;; disable all doc popups
lsp-ui-doc-show-with-cursor nil ;; doc popup for cursor
lsp-ui-doc-show-with-mouse nil ;; doc popup for mouse
lsp-ui-doc-delay 99999 ;; delay in seconds for popup to display
lsp-ui-doc-include-signature t ;; include function signature
;; lsp-ui-doc-position 'at-point ;; top bottom at-point
;; lsp-ui-doc-alignment 'window ;; frame window#2021-12-0813:41ericdalloBTW, the lsp-ui-doc-show-with-cursor was changed to be nil by default this week along with the lsp-ui-sideline-show-code-actions, reducing noise on emacs-lsp :)
https://github.com/emacs-lsp/lsp-ui/pull/668#2021-12-0814:05practicalli-johnny@ericdallo Is it possible to have the lsp-ui-doc popup on a key binding, rather than being automatic? What would be the interactive function to call for that (if possible).
I do like the popup presentation, but only want to see it when I explicitly call for it.#2021-12-0814:09practicalli-johnnyIf its not possible to have a key binding for lsp-doc-ui or not likely to be added, I can continue using the lsp-describe-thing-at-point instead#2021-12-0814:19ericdalloAFAIK is lsp-ui-doc-show the command that you can add a keybinding for it#2021-12-0814:30practicalli-johnnyAh, I need to enable the lsp-doc-ui for that to work, that was my confusion. So I can get a manual only lsp-ui-doc window by creating a key binding for lsp-ui-doc-show and lsp-ui-doc-hide and switch off the automatic popups. Thanks
lsp-ui-doc-enable t ;; lsp ui doc popup enabled
lsp-ui-doc-show-with-cursor nil ;; doc popup for cursor
lsp-ui-doc-show-with-mouse nil ;; doc popup for mouse#2021-12-0910:04Martynas MIf you do presentations press <space> z f. Thank me later. š#2021-12-0910:37practicalli-johnny@invertisment_clojuria I also encourage anyone sharing their screen with Spacemacs to scale the Emacs frame size with SPC z f k especially so when on a larger resolution monitor.
This video is usually the size I share at which also makes it readable on tablet devices
https://youtu.be/NDrpclY54E0#2021-12-1413:58Ben SlessAbout once a month I give a try to LSP in Spacemacs and get bummed that it impolitely overrides CIDER's behavior with describe-thing-at-point and cursor hover š#2021-12-1413:59Ben SlessThis isn't LSP's fault, it's just Spacemacs' behavior#2021-12-1414:12practicalli-johnnyHave you raised an issue on the Spacemacs repository about this?#2021-12-1414:20practicalli-johnnyI don't have an issue with this binding as I find the other help bindings more useful.
I can also get docs from auto-complete and LSP UI doc popups.
Feel free to suggest some alternative key bindings to the Spacemacs mainteners, or rebind keys in the dotspacacs/user-config#2021-12-1414:01practicalli-johnnyIs this one key binding definition in the Clojure layer your only concern?#2021-12-1414:01Ben Slessnot just the key binding, also the display at the bottom frame when the cursor hovers over symbols#2021-12-1414:02Ben SlessGenerally I'd want to keep all of Clojure layer's bindings unchanged#2021-12-1414:05practicalli-johnnyI only recall that one changed key binding. LSP does add its own keybindings along side the Cider and clj-refactor key bindings (I have used clj-refactor for years, so theyay be some over-riding there)#2021-12-1414:08Ben SlessPresumably
"hh" 'cider-doc
"=r" 'cider-format-region
"ge" 'cider-jump-to-compilation-error
"gr" 'cider-find-resource
"gs" 'cider-browse-spec
"gS" 'cider-browse-spec-all))
#2021-12-1414:08Ben Slessand mr#2021-12-1414:10practicalli-johnnyLSP by nature adds a lot of common language features, some of which CIDER also implemented. They are both self-described IDEs so bound to be some crossover.
LSP is a big change to Emacs UI (although more features in the UI are now switched off by default).
Unless there are specific LSP features needed, stick with Cider and clj-kondo#2021-12-1415:35Ben SlessI'm very happy with cider, mostly concerned I might be missing something by not using LSP too#2021-12-1416:59practicalli-johnnyTake a look at the features guide to see if you really need LSP https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/#lsp-features#2021-12-1417:02practicalli-johnnyIf you do try LSP, then it would also be worth looking at how to enable/disable specific features
https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/#2021-12-2201:23Drew VerleeHow would i do a multiline regex match? i'm used to doing SPC / but often i want to match at least two lines.#2021-12-2316:22Mario C.I would like to know as well, I have needed to do this in the past and could not figure it out#2022-12-3113:37Ho0manHi everyone,
I use practicalli's config for spacemacs but last month after updating to the latest the auto-indentation and auto-alignment stopped working.
Before that any change for instance to a let form caused spacemacs to instantly align the binding and value forms vertically. What settings do I have to change for it to get fixed?
Info :
⢠Emacs :
⦠Version : GNU Emacs 27.2
⢠Spacemacs :
⦠branch : develop
⦠commit 5bcedd19123248bc7a6d80994784062e524ebe05
commit 5bcedd19123248bc7a6d80994784062e524ebe05 (HEAD -> develop, origin/develop, origin/HEAD)
Author: SpacemacsBot <
⢠Practicalli's .spacemacs.d :
commit 288effd2f3c040e59fd83d28b5afd967c3649603 (HEAD -> live, origin/live, origin/HEAD)
Author: John Practicalli <
⢠Changes to the Practicalli's default config :
(clojure :variables
- ;; clojure-backend 'cider ;; use cider and disable lsp
- ;; clojure-enable-linters 'clj-kondo ;; clj-kondo included in lsp
+ clojure-backend 'cider ;; use cider and disable lsp
+ clojure-enable-linters 'clj-kondo ;; clj-kondo included in lsp
cider-repl-display-help-banner nil ;; disable help banner
cider-pprint-fn 'fipp ;; fast pretty printing
- clojure-indent-style 'align-arguments
clojure-align-forms-automatically t
+ clojure-indent-style 'align-arguments
clojure-toplevel-inside-comment-form t ;; evaluate expressions in comment as top level
+ clojure-enable-clj-refactor t
cider-result-overlay-position 'at-point ;; results shown right after expression
cider-overlays-use-font-lock t
cider-repl-buffer-size-limit 100 ;; limit lines shown in REPL buffer
Thanks a lot for you help#2022-12-3122:12practicalli-johnnyI changed that behaviour a while ago, as it clashed really badly with LSP.
If you are not using LSP, or have disabled the auto-formatting of LSP, then uncomment the hook that is in the dotspacemacs/user-config section
;; Auto-indent code automatically
;;
;; (add-hook 'clojure-mode-hook #'aggressive-indent-mode)
It's on line 1046#2022-12-3122:13practicalli-johnnyIf you do use LSP to auto-format, then SPC = l will do some of the aligning, although it's not quite as good.#2022-01-0105:56Ho0manThanks a lot @U05254DQM#2022-01-0102:43Drew Verlee,ep; should eval the last experession to a comment instead i get nothing... nothing my message buffer either.#2022-01-0112:22practicalli-johnnyIf , e e is returning a result and , e p ; is not returning a result, then it sounds like there is a bug in Cider.#2022-01-0117:08Drew Verleei'll restart things on my end first then file a bug report. thanks john.#2022-01-0118:55practicalli-johnnyI just added a .cljc file along side a .clj fie and can evaluate the last sexp to a comment.
Is the issue with .cljc file from within a ClojureScript project?
That might be more likely to have a bug.#2022-01-0118:57Drew Verlee> Is the issue with .cljc file from within a ClojureScript project?
> That might be more likely to have a bug.
that is the context of the issue yes.#2022-01-0118:58Drew Verleeor wait, i'm not sure how i started the repl.#2022-01-0119:00Drew Verleeit doesn't matter. it's not happening now. This is why i don't report bugs, because they seem to float away on the wind half the time.#2022-01-0119:30practicalli-johnnyIf you are using shadow-cljs then I think its still a bug. Pretty Print with a ClojureScript repl was an issue with cider, but was fixed in the latest piggeback library apparently
https://github.com/clojure-emacs/cider/issues/2667#2022-01-0119:32practicalli-johnnyAh,, it does seem to have been fixed in shadow-cljs too
https://github.com/thheller/shadow-cljs/issues/716#2022-01-0119:33practicalli-johnnyAlthough I am using cider, cljs, figwheel and a fairly recent piggieback and its still not pretty printing š¤·#2022-01-0119:38practicalli-johnnyI wonder if using the cider-inspect tool would work more consistently with ClojureScript. Seems to work with simple examples I have.#2022-01-0207:45Akku Ankkai'm trying to get a clj/spacemacs set up going, and I think my install is broken somehow. helm-cider tries to load a feature from cider cider-compat, which seems to have been removed from cider itself. i checked helm-cider on gh and the (require 'cider-compat) is still in the codebase? whaddoidoā½ any help or ideas are much appreciated.#2022-01-0207:46Akku Ankkaalso my isn't starting which i assume is related because the cider-compat bug happens on buffer load.#2022-01-0209:47practicalli-johnny@cwmckenzie02 I haven't seen this issue before. If installing Spacemacs for the first time, there is not much to go wrong (except packages failing to download). Adding Clojure only needs clojure added to the layer list
Assuming Emacs was restarted after all the initial packages were downloaded, I would delete all the cider packages from ~/.emacs.d/elpa/ directory tree (or the ~/.emacs.d/elpa/ directory itself if there is a fast internet connection) and restart Emacs
Here is a general troubleshooting guide
https://practical.li/spacemacs/install-spacemacs/troubleshooting.html#2022-01-0209:50practicalli-johnnyI assume that Java and Clojure (Clojure CLI or Leiningen) have already been installed and tested they work
https://practical.li/spacemacs/before-you-start/#2022-01-0210:25practicalli-johnny@cwmckenzie02 it seems like there is a bug with helm cider. It's relying on a piece of code that no longer exists.
https://clojurians.slack.com/archives/C0617A8PQ/p1641081555031900#2022-01-0211:59Akku Ankkaoh weird?#2022-01-0212:01Akku Ankkai did update stuff today, but i remember seeing that the file was removed a while ago. i'll have a look at git blame and see when the file was removed maybe?#2022-01-0212:01practicalli-johnnyFor anyone updating packages from the 29th December onward, there is a bug in the helm-cider package caused by a change in cider.
Cider has dropped the cider-compat namespace which helm-cider requires (unneccessarily), preventing Emacs from loading Clojure files correctly. I've https://github.com/clojure-emacs/helm-cider/issues/12
Options for a temporary fix
1. Edit ~/.emacs.d/elpa/27.1/develop/helm-cider-20180307.458/helm-cider-spec.el and comment line 16 that says (require 'cider-compat) or just delete that line. The package hasnt changed for several years, so this should only need to be done once
2. Pin cider to an earlier version (or use a back up from before 29th December) by adding the following to dotspacemacs/additional-packages - you will need to delete the package cider-20220102.936 clojure-mode-20211119.1904 and cider-eval-sexp-fu-20190311.2152 from ~/.emacs.d/elpa/ and comment out cider or (cider ,,,) from the layer list (as that will automatically download the latest version)
(cider :location
(recipe :fetcher github
:repo "clojure-emacs/cider"
:commit "ae376429a8cf22b82a9e18ff844bdfbe5fc7ecc1"))
Restart and the pinned version of Cider will be installed.
If you have clojure variables set in the layer list, then you can uncomment them and restart for those to take effect (this will not update the package, that will only be done if using SPC f e U )#2022-01-0217:59practicalli-johnnyThe helm-cider package has been updated to remove the issue and its package is available on Melpa - so it will be included in the Spacemacs package update, SPC f e U
Thanks to Bozhidar for a speedy response.#2022-01-0212:03practicalli-johnny@cwmckenzie02 this https://github.com/clojure-emacs/cider/commit/c60598fa4df6cdd3331c29b8e319cc23de1b7cc6 removes cider-compat.#2022-01-0212:03Akku Ankkaya i just saw that#2022-01-0212:04Akku Ankkathanks!#2022-01-0212:05practicalli-johnnySimplest thing seems to be to remove the line from the helm-cider package. I'll raise a PR and see if that gets accepted#2022-01-0212:05practicalli-johnnyon the helm-cider repository#2022-01-0212:08Akku Ankkayep that works#2022-01-0212:08Akku Ankkaand it did pull down the lsp binary once that was out of the way#2022-01-0212:20Akku Ankkathanks again!#2022-01-0212:48practicalli-johnny@cwmckenzie02 If this is the first time using LSP, you may find this useful https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/#2022-01-0212:51practicalli-johnnyI've set some of these options in the dotspacemacs-configuration-layers section
(lsp :variables
;; Formatting and indentation
lsp-enable-on-type-formatting t
;; Set to nil to use CIDER features instead of LSP UI
lsp-enable-indentation t
lsp-enable-snippet t
;; `lsp-toggle-symbol-highlight` toggles highlighting
;; subtle highlighting for doom-gruvbox-light theme defined in dotspacemacs/user-config
lsp-enable-symbol-highlighting t
;; Show lint error indicator in the mode line
;; lsp-modeline-diagnostics-enable t ;; default
;; lsp-modeline-diagnostics-scope ':workspace ;; default
;; popup documentation boxes
lsp-ui-doc-enable t ;; documentation popups
lsp-ui-doc-show-with-cursor nil ;; doc popup triggered by cursor
lsp-ui-doc-show-with-mouse nil ;; doc popup triggered by mouse
lsp-ui-doc-delay 1 ;; delay in seconds for popup to display
lsp-ui-doc-include-signature t ;; include function signature
;; lsp-ui-doc-position 'at-point ;; top bottom at-point
;; lsp-ui-doc-alignment 'window ;; frame window
;; code actions and diagnostics text as right-hand side of buffer
;; disabling this feature only works in dotspacemacs/user-config
lsp-ui-sideline-enable nil
lsp-ui-sideline-show-code-actions nil
;; lsp-ui-sideline-delay 500
;; lsp-ui-sideline-show-diagnostics nil
;; function reference count and test coverage
lsp-lens-enable t
;; Efficient use of space in treemacs-lsp display
treemacs-space-between-root-nodes nil
;; Optimization for large files
lsp-file-watch-threshold 10000
lsp-log-io nil)#2022-01-0217:59practicalli-johnnyThe helm-cider package has been updated to remove the issue and its package is available on Melpa - so it will be included in the Spacemacs package update, SPC f e U
Thanks to Bozhidar for a speedy response.#2022-01-0912:24practicalli-johnnyA PR to fix markdown formatting has been created from this issue I raised
https://github.com/syl20bnr/spacemacs/issues/15256
Essential, when pressing TAB in a table the formatting if the table would slip in some + characters, breaking the table when viewed on GitHub (e.g in a readme.md).
This has been due to the inclusion of orgtabl-mode (which is excellent or org mode), however markdown now has its own features that orgtbl provides, so it's being removed from the markdown layer#2022-01-1012:15Martynas MHey.
Is there a way to execute a custom clojure function in spacemacs?
I'd like to execute a function and take the current namespace name as an argument.#2022-01-1014:19practicalli-johnnyA Clojure function can be called when using cider-refresh, for example to stop and start component service
https://practical.li/spacemacs/clojure-repl/component-lifecycle.html#configure-cider-refresh-to-use-component-lifecycle
I am unsure if there is a general way to call Clojure functions from Emacs lisp#2022-01-1015:01Martynas MI have a function (from @_seancorfield) that cleans whole namespace from all of the variables so that it would be fresh again.
So I wanted to call it using a key combination#2022-01-1015:29practicalli-johnnyIt seems cider-insert-in-repl takes a string argument that contains a Clojure function, which is then run in the REPL (I haven't tried this).
So you could add a elisp function to dotspacemacs/user-config that calls the Clojure function you want
Asking in #cider may provided other suggestions #2022-01-1118:24Drew Verleei added `.clj-kondo/.cache` to ~/.gitignore then ran `git config --global core.excludesfile ~/.gitignore.` I would now expect to not see .clj-kondo/.cache files in any project, but i do. given i these files both when i run git at the command line and magit i assume the line i added to my gitignore doesn't work.#2022-01-1118:25Drew Verleeits called magit because its like magic for git, btw. i know i'm the first person to ever realize this.#2022-01-1118:40practicalli-johnny@drewverlee I use **/.clj-kondo/.cache as the pattern in my global gitignore config#2022-01-1118:44Drew Verleety, ill look into why that works. i have seen it before and forgotten#2022-01-1119:04practicalli-johnnyI believe the means any directory starting point, but not sure why it's required - need to read the docs again myself :rolling_on_the_floor_laughing:#2022-01-1119:06practicalli-johnnyI have a load of patterns in the git directory in this repo https://github.com/practicalli-john/dot-files-linux#2022-01-1119:09borkdude<just added to my global gitignore>#2022-01-1215:15practicalli-johnnyI enjoy using https://github.com/lambdaisland/kaocha as a test runner for Clojure. I saw https://github.com/magnars/kaocha-runner.el package that runs Kaocha test runner from within Emacs.
Would this be of interest to add to the Spacemacs Clojure layer?
I am thinking of proposing adding it as an optional feature, turned on by a Clojure layer variable. Does this sound useful?
Thanks.#2022-01-1215:16alexdavisI have that setup manually so it would be useful to me#2022-01-1215:21practicalli-johnnyAfter getting things wrong a lot last night, I figured out how to add it correctly (well working) this morning.
I'll raise an issue on Spacemacs and then submit a PR (hopefully by the end of today)#2022-01-1215:19practicalli-johnnySome of the benefits of using Kaocha seem to be
⢠using fail-fast tests, so you dont have to wait for a full test run to end
⢠a bit faster to run than cider-test, especially after the initial run (I assume its only running tests that have changed)
I'll try out some of the other kaocha features and see if they are applicable.#2022-01-1215:43practicalli-johnnyI've raises a feature request issue on Spacemace repository, with the rough example code to add kaocha-runner as an optional feature. It has key bindings that seem to be sensible to me, feel free to comment
https://github.com/syl20bnr/spacemacs/issues/15267#2022-01-1223:13practicalli-johnnyI've raises a pull request to add kaocha-runner package to the Clojure layer
https://github.com/syl20bnr/spacemacs/pull/15268#2022-01-1915:29jumarI'm getting this error when trying to run cider-jack-in for a deps.edn project:
cider-clojure-cli-jack-in-dependencies: Wrong type argument: sequencep, :dev
I have quite minimal deps.edn
{:paths ["src"]
:deps {org.clojure/clojure {:mvn/version "1.11.0-alpha4"}
medley/medley {:mvn/version "1.3.0"}
cheshire/cheshire {:mvn/version "5.10.1"}
}
}
I have this config in custom-set-variables in .spacemacs
'(cider-clojure-cli-aliases :dev)
And in ~/.clojure/deps.edn:
:aliases
{
:new {:extra-deps {com.github.seancorfield/clj-new
{:mvn/version "1.2.362"}}
:exec-fn clj-new/create
:exec-args {:template "app"}}
;; this is the alias used by cider - customized via `(cider-clojure-cli-aliases :dev)` (see .spacemacs)
:dev {:jvm-opts [...
The strange thing is that it works just fine in another project/folder.#2022-01-1922:22practicalli-johnnyAs another project runs okay from CIDER, then it would seem more likely an issue with this particular project.
I suggest running a terminal REPL process from the command line, ie. clojure, in the root of the project director that is not starting. That may help identify if its the project or cider at fault.
If its the project, try delete .cpcache
If not, check the Emacs messages buffer, SPC b m to see if something is not right with the clojure command line that was assembled to run the REPL from CIDER.
The ~/.clojure/deps.edn snippet doesnt show the details of the :dev alias, but I cant see anything obvous with any of the other code
I assume the other project is using the same version of org.clojure/clojure dependency#2022-01-2009:42jumar@U05254DQM Thanks for the advice.
I had an extra paren in the deps.edn file (I'm not sure if it was there from the beginning or only after I simplified it).
Error building classpath. Error reading edn. Unmatched delimiter: } (/Users/jumar/workspace/empear/src/codescene/cloud-infra/deps.edn)
Nevertheless - I fixed it and clojure now works when running from command line.
However, emacs is still reporting the same error (there's nothing more in the messages buffer)
Starting new CIDER session ...
cider-clojure-cli-jack-in-dependencies: Wrong type argument: sequencep, :dev
If I remove the :dev alias from .spacemacs config (comment out '(cider-clojure-cli-aliases :dev) )then it works but I'd really like to have it.#2022-01-2010:43practicalli-johnny@U06BE1L6T I wonder if the same issue occurs if the :dev alias is included via a .dir-locals.el
https://practical.li/spacemacs/clojure-projects/project-configuration.html#2022-01-2010:48practicalli-johnnyThis is the approach I have taken to include aliases by default.
I assume the alias could also be set via a layer variable on the Clojure layer.
Although none of that explains why it works for one project and not another.
You could try renaming the user level alias to something like :env/dev and set that as the default alias, to ensure the right alias is being used (and not some local alias), but that seems unlikely#2022-01-2010:52jumarThanks for the suggestions. I'll try these a bit later š#2022-01-2010:53practicalli-johnnyI define the :dev alias as a string when setting as a default value. I don't think that would be the issue, but I can't think what else to try.#2022-01-2010:47jumarspacemacs keeps asking me to install asciidoc layer when I open a .adoc file, which I don't want.
How can I turned that off?
And can I quickly uninstall the layer without restarting emacs?#2022-01-2011:22practicalli-johnnyOnly install layers explicitly defined in the layer list - this will disabled prompting to install other layers dotspacemacs-enable-lazy-installationĀ ānil - it's at the top of the .spacemacs file#2022-01-2011:27practicalli-johnnyTry setting the above setting to nil and the SPC f e R to reload the Spacemacs config. That should remove the package
Otherwise I assume a package can be removed via the Emacs package manager
https://stackoverflow.com/questions/20541322/how-to-remove-installed-elpa-package#2022-01-2011:42jumarThanks again!
I'd prefer to disable this only for this particular package but if there's no other option then I'll disable it for all.#2022-01-2521:09RichardI've just installed Spacemacs on a windows machine and I get the following error:
Query timeout error: "Query timed out", 30 [2 times]
Error running timer āgit-gutter:live-updateā: (file-missing "Searching for program" "No such file or directory" "diff")
I'd greatly appreciate some suggestions on how I can find the source of the problem and how to fix it. Thank you.#2022-01-2521:16practicalli-johnnySounds like Emacs cannot find a fiff tool on the command line (or what ever git-gutter is trying to call)
My suggestions would be:
Install a diff CLI tool on windows and make sure Emacs can find it in the path (check path with SPC f e e )
Or disable git-gutter if it's causing an issue#2022-01-2521:18RichardThanks John. I'll give that a try. What is git gutter?#2022-01-2521:19practicalli-johnnyOr try diff-hl rather than git-gutter
https://develop.spacemacs.org/layers/+source-control/version-control/README.html#configuration#2022-01-2521:20practicalli-johnnyThey are ways to show which lines have changed compared to the last commit in the Emacs gutter#2022-01-2522:28RichardI think the problem was with the github layer, which I don't use anyway. I've disabled it and it's not causing a problem anymore. Thank you always for your help, John.#2022-02-0602:31omendozarHi, is there a way to extract a function, which already has many references to it, to another namespace using Spacemacs? Iām trying to find something in theĀ `cljr-refactor`Ā package but I canāt find anything.#2022-02-0714:09practicalli-johnnyPracticalli Spacemacs updates
⢠https://practical.li/spacemacs/evaluating-clojure/undefine.html - includes how to do this with Cider commands, Clojure code and clojure.tools.namespace/refresh
⢠https://practical.li/spacemacs/evaluating-clojure/interupt.html - stop long running evaluation process (>1 second) and how to configure a choice of spinner for visual indicator in the REPL buffer #2022-02-0714:25lreadAwesome! @U05254DQM I don't know if this tip fits, or even if it is a good one, but when I have a long-running loop, I find temporarily including a (Thread/sleep 1) helps to make requests to interrupt respond quickly.#2022-02-0715:06practicalli-johnnyAdding a sleep is a nice idea. If the CPU is getting hammered by the code this would be very useful. I'd add this as a hint somewhere, Thanks.#2022-02-0820:58practicalli-johnnyKaocha-runner.el is now part of the Spacemacs layer, enabled by the variable clojure-enable-kaocha-runner
I've added a page to Practicalli Spacemacs on using Kaocha from Cider, Clojure CLI alias or as a shell script. Including using the watch mode.
https://practical.li/spacemacs/testing/kaocha-test-runner.html#2022-02-0915:00paulspencerwilliamsWhat is the simple and idiomatic way to configure org-babel languages within spacemacs. Iāve tried
(defun dotspacemacs/user-config ()
(with-eval-after-load 'org
(org-babel-do-load-languages
'org-babel-load-languages
'((sql . t))))
But when I try to execute
#+name: my-query
#+begin_src sql
select * from people
#+end_src
Iām asked to confirm that Iād like to execute the code block, and when I answer yes, I get
Wrong type argument: stringp, nil
#2022-02-0916:16practicalli-johnnyI didn't need to add any config for Clojure, although I did need to start a Clojure REPL.
https://practical.li/spacemacs/org-mode/literate-programming/#2022-02-0916:18practicalli-johnnyI assume the SQL layer is installed and confirmed working already https://develop.spacemacs.org/layers/+lang/sql/README.html#2022-02-0916:21paulspencerwilliamsActually, I'd not installed the sql layer, as native emacs has basic sql support. But subsequently, I've installed the sql layer and testing now.#2022-02-0916:29paulspencerwilliamsEm... So, I've installed the sql layer. I've connected to a database with M-x sql-postgres and been able to query tables etc. I've also saved the connection. and connected to that saved session. But once again, when I attempt to run a sql command in a orgmode file, I receive the same error.#2022-02-0916:32paulspencerwilliamsIt's definitely related to my configuration though.#2022-02-0916:32paulspencerwilliamsIf I remove my attempted babel config, I can successfully execute the following org file section.
#+name: list files
#+begin_src bash
ls
#+end_src
It correctly lists files.#2022-02-0916:33paulspencerwilliamsHowever, if I apply my config, then I can't even execute that bash script, and I receive the same Wrong type argument: stringp, nil. error#2022-02-0916:36paulspencerwilliamsOh, that might be a red herring. I didn't realise , b b prompted and execute every script in the file.#2022-02-0916:37paulspencerwilliamsGoing to grab some food, and come back to it later. As well as look at the thread in #clojure about configuring Cider to include the :test profile when running tests so I can pick up test-resources#2022-02-0916:48practicalli-johnnyThe Org code block that was provided only defines a names query, to be used with other code blocks, as you discovered it does not run the SQL query.#2022-02-0916:50practicalli-johnnyTo run an SQL query, details of the database should be provided in the meta data of the code block, e.g.
#+name: my-query
#+header: :engine mysql
#+header: :dbhost host
#+header: :dbuser user
#+header: :dbpassword pwd
#+header: :database dbname
#+begin_src sql
SELECT * FROM mytable
WHERE id > 500
#+end_src
This is from https://www.orgmode.org/worg/org-contrib/babel/languages/ob-doc-sql.html#2022-02-0916:58paulspencerwilliamsOh, that makes sense although I assumed you could define the connection info elsewhere so I wouldn't, for example, commit them to git?#2022-02-0916:59practicalli-johnnyI also assume you could just define the connection once in the org file and then just use that, but not sure of the syntax.#2022-02-0917:00paulspencerwilliamsOkay, cheers. I'll try these later!#2022-02-0917:11practicalli-johnnyI'm interested in how you get on, so feel free to share anything that works.
It seems some languages support session-based evaluation. If SQL supports this then perhaps the database information can be shared between code blocks. If SQL doesnt support session-based evaluation, then probably have to include the database connection details for each code block.#2022-02-0917:13practicalli-johnnyOr you could define all the SQL statements as their own named code blocks and use those statements in a language block, such as Clojure, and run those queries using next.jdbc.
Not something I have tried yet though.#2022-02-1007:10paulspencerwilliamsSo declaring the parameters fails a bit later in the process. So, proving general postgres connectivity using M-x postgressā¦
db=> select count(*) from locations;
select count(*) from locations;
count
----------
123456789
(1 row)
But valid sql blocks in an org file result in empty result
#+name: my-query
#+header: :engine postgres
#+header: :dbhost redacted
#+header: :dbuser redacted
#+header: :dbpassword redacted
#+header: :database db
#+begin_src sql
SELECT count(*) FROM locations
#+end_src
#+RESULTS: my-query
|---|
and invalid queries (misspelt table name) donāt returns errors, but once again empty results suggesting it doesnāt actually do anything.
#+name: my-query
#+header: :engine postgres
#+header: :dbhost redacted
#+header: :dbuser redacted
#+header: :dbpassword redacted
#+header: :database db
#+begin_src sql
SELECT count(*) FROM incorrect_locations
#+end_src
#+RESULTS: my-query
|---|
#2022-02-1007:11paulspencerwilliamsTime to put this down, and revert back to using .sql files, at least for the day.#2022-02-1008:36practicalli-johnnySorry to hear it didn't work, thanks for sharing.#2022-02-1116:22Drew VerleeWhat are some common ways to keep spacemacs as snappy and fast as possible? I realize this is something of an impossible question, but maybe there are some easy wins. Like if it was the jvm maybe you would check how much mem was allocated. Or how in most projects having as few deps as possible usually helps.#2022-02-1116:39practicalli-johnnyProfile Emacs to see if there is any issues seems to be a common approach https://practical.li/spacemacs/install-spacemacs/troubleshooting.html#profiling-emacs#2022-02-1116:41practicalli-johnnyThe scorched earth approach would be to backup your config and reinstall from scratch.
Test without applying any of your own configuration and steadily add your customisations back in to see if there is an impact#2022-02-1116:43practicalli-johnnyLess drastic would be to remove any config and packages not needed. Also clean out the .cache files#2022-02-1116:49practicalli-johnnyRemoving unused layers shouldn't make any difference, as its all lazy loaded. It could be possible that a package in a layer is causing problems. This package could be excluded by adding the package name to dotspacemacs-excluded-packages although this might break some functionality.#2022-02-1116:50practicalli-johnnyI added some font rendering optomisations to dotspacemacs/user-config but not sure if they made any real difference.
https://github.com/practicalli/spacemacs.d/blob/live/init.el#L806-L825#2022-02-1116:55practicalli-johnnyIf using MacOSX, then some versions of Emacs are not that fast when running Spacemacs. These seem to be the recommended versions
https://github.com/syl20bnr/spacemacs/tree/develop#macos#2022-02-1116:59practicalli-johnnyA potentially significant change is to switch to Ivy for completion, rather than helm.
I believe this is done by adding the ivy layer and removing the helm layer in the Spacemacs configuration layers.
https://develop.spacemacs.org/layers/+completion/ivy/README.html
Ivy is a sub-set of the features of helm, so you may or may not miss those features.#2022-02-1117:00practicalli-johnnyOh, and of course, update Spacemacs code, your Spacemacs config against the template (`SPC f e D`) and get the latest packages (`SPC f e U`) to get the latest updates and improvements (but dont update when you are busy in the rare case that there is an issue)
https://practical.li/spacemacs/install-spacemacs/update.html#2022-02-1117:11practicalli-johnnyFinally, use Emacs 28 with native compilation. This may speed things up or break things (or both)#2022-02-1119:31Diego NayaI had a great speedup migrating from emacs27 (the std package in fedora 35) to emacs 28 (had to install an outside package)#2022-02-1122:03Drew VerleeThanks a ton! I'm definitely going to try these ideas over the weekend.#2022-02-1122:04Drew VerleeMoving around my project has been sluggish and that's a mental drag i don't need.#2022-02-1203:29Drew Verleeok wow. yea. i'm on 28 right now and it feels snapper. That or i'm just excited its Friday. time will tell i suppose.#2022-02-1211:47practicalli-johnnyI am curious to understand what is sluggish when moving around projects. What commands are used?#2022-02-1211:50practicalli-johnnyNothing like a new installation to give a sense of speed š
All those newly downloaded and complied Emacs pages should help, even more so if the packages were natively compiled (something I haven't tried yet)#2022-02-1213:42Drew VerleeJust normal text movement (evil mode up down etc..) had delays i was noticing. I didn't run profiler and collect samples so I'm not sure how often it was happening or why. But 28 feels faster right out of the box for me.
I used the snap from ubuntu which i read is natively compiled.#2022-02-1409:48paulspencerwilliamsHas anyone got suggestions on why Iām struggling to break using #dbg or #break work in Spacemacs + Cider? If I , d b the same function, I can invoke, hit breakpoints, and debug successfully.#2022-02-1410:29practicalli-johnnyI have always used , d b
They both should sprinkle (invisible) break points throughout an expression.
I can try #dbg later today, but if it's not working the same then I assume it's a Cider issue
Is there an example you can share where it's not working?#2022-02-1410:42paulspencerwilliamsI typically use , d b but this this case need conditional breakpoint support hence trying #dbg Iāve not got a non commercial project Iāve tried it on, but I think it will fail on all projects (Iāve never seen it work on a hand full of work projects). Iāll try at lunch on a toy project.#2022-02-1411:27practicalli-johnnySo I assume it's something like this. I'll also give it a try
(dotimes [i 10]
#dbg ^{:break/when (= i 7)}
(prn i))#2022-02-1414:09practicalli-johnnyThe above code does break correctly when evaluating the dotimes expression (`, e f`)#2022-02-1414:11practicalli-johnnyUsing #break without a condition also works in this basic example
(dotimes [i 10]
#break (= i 7)
(prn i))
#2022-02-1416:32paulspencerwilliamsSo.... it also works for me in my own deps.edn project, but not a more complex commercial project. Looks like I need to do into that a bit more. Thanks.#2022-02-1416:48practicalli-johnnyThe only thing I can think of is that is not actually meeting the condition set with :break/when, or that there is a subtle bug in the cider-debug code.
This has been a useful exercise for me, thanks. I've pushed some very simple examples to the Practicalli Spacemacs book
https://practical.li/spacemacs/debug-clojure/cider-debug.html#2022-02-1418:39jumarSometimes there used to be problems with executions in other threads like a ring handler- I can try to check if it works for our app tomorrow #2022-02-1419:12paulspencerwilliamsCheers @U05254DQM, I had ruled out conditional syntax etc by simplifying and removing the conditional.
@U06BE1L6T I have similar issues when using ring handlers, but my problem earlier was a single threaded app, with the function being tested invoked indirectly and directly on the same thread. #2022-02-1707:49Martynas MDoes anybody know why treemacs fails to highlight git-changed-files? It worked long time ago and now it doesn't work even if I constantly use newest develop version.#2022-02-1717:57practicalli-johnnyGit status is an optional feature in treemacs, so should be enabled in the layers definition in .spacemacs
(treemacs :variables treemacs-use-git-mode 'deferred)
If this has already been enabled since restarting Emacs or reloading the .spacemacs config, then it could be a bug in the treemacs package.#2022-02-1718:25practicalli-johnnyThe above works for me on a fairly recent update of Spacemacs and packages. File names are highlighted with a different colour a few seconds after changes are made.
Another possible reason git status may not show in treemacs could be the theme used (if some how the faces were the same for changed and unchanged states, although this is less likely).#2022-02-1719:46Martynas MIt should be a bug because when I freshly start up spacemacs it shows changed files just fine. But then if I refresh the tree then it shows nothing š#2022-02-1918:09Drew VerleeIs anyone using aggresive indent mode? it's too aggresive! like if i'm typing ... cursor at * `:a *)` then automatically moves the paren back `:a*)` idk maybe if i could configure the time on its reaction? or maybe something is wrong because its conflicting with my clojure variables?
``` ;; <https://develop.spacemacs.org/layers/+lang/clojure/README.html>
(clojure :variables
;; clojure-backend 'cider ;; use cider and disable lsp
;; clojure-enable-linters 'clj-kondo ;; clj-kondo included in lsp
cider-repl-display-help-banner nil ;; disable help banner
cider-stacktrace-default-filters 'project
cider-print-fn 'puget ;; fast pretty printing
clojure-indent-style 'align-arguments
clojure-align-forms-automatically t
clojure-toplevel-inside-comment-form t ;; evaluate expressions in comment as top level
cider-result-overlay-position 'at-point ;; results shown right after expression
cider-overlays-use-font-lock t
cider-repl-buffer-size-limit 100 ;; limit lines shown in REPL buffer
clojure-enable-fancify-symbols t ;; fn and comp now look cool as shit
clojure-enable-clj-refactor t ;; i never get to use this but its nice to imagine i could!
)```
;; Auto-indent code automatically
;; <https://emacsredux.com/blog/2016/02/07/auto-indent-your-code-with-aggressive-indent-mode/>
;; breaking stuff?
;; (add-hook 'clojure-mode-hook #'aggressive-indent-mode)#2022-02-2014:59practicalli-johnnyI stopped using aggressive indent mode as it was getting too aggressive on large expressions.
LSP formatting is less aggressive, but doesn't automatically align forms#2022-02-2017:48Drew Verleequick note here i can elobrate if needed, i think its cider-print-fn not cider-pprint-fn as i saw in the practicalli init file that i clone. That being said, i see no diff and i even changed it to use puget from filpp.#2022-02-2019:00practicalli-johnnySeems version 21 of CIDER has marked the pprint name obsolete#2022-02-2019:01practicalli-johnny(make-obsolete-variable 'cider-pprint-fn 'cider-print-fn "0.21")
(make-obsolete-variable 'cider-pprint-options 'cider-print-options "0.21")
#2022-02-2019:44practicalli-johnnyI've changed my .spacemacs config to use puget as well, as it sorts the keys in order to give consistent results for large data structures
(clojure :variables
;; clojure-backend 'cider ;; use cider and disable lsp
;; clojure-enable-linters 'clj-kondo ;; clj-kondo included in lsp
clojure-enable-kaocha-runner t ;; enable Kaocha test runner
cider-repl-display-help-banner nil ;; disable help banner
cider-print-fn 'puget ;; pretty printing with sorted keys / set values
clojure-indent-style 'align-arguments
clojure-align-forms-automatically t
clojure-toplevel-inside-comment-form t ;; evaluate expressions in comment as top level
cider-result-overlay-position 'at-point ;; results shown right after expression
cider-overlays-use-font-lock t
cider-repl-buffer-size-limit 100 ;; limit lines shown in REPL buffer
)#2022-02-2209:24jumarI've been quite annoyed by magit's slowness in the past few months.
I'm not sure when it started happening but I typically have to wait about 5 seconds for things like magit-status or even commit.
It definitely used to be much faster (perhaps 2 seconds, but not 5+)
As an experiment, I changed magit-diff-refine-hunk variable to t (selected) and then to never - it's perhaps a bit faster but still slow.
Here's the cpu profile I tried to capture:
- magit-status-refresh-buffer 449 55%
- magit-run-section-hook 433 53%
- apply 433 53%
+ magit-insert-status-headers 129 16%
+ magit-insert-unpushed-to-pushremote 78 9%
+ magit-insert-stashes 69 8%
+ magit-insert-unpushed-to-upstream-or-recent 36 4%
+ magit-insert-staged-changes 26 3%
+ magit-insert-untracked-files 25 3%
+ magit-insert-unstaged-changes 24 2%
+ forge-insert-pullreqs 17 2%
+ magit-insert-unpulled-from-pushremote 12 1%
+ magit-insert-merge-log 11 1%
+ magit-insert-rebase-sequence 1 0%
+ magit-insert-sequencer-sequence 1 0%
+ magit-insert-bisect-log 1 0%
#2022-02-2209:25jumarWhat is your experience when using magit?
Is it typically fast enough?#2022-02-2209:27jumarEven just stashing changes takes at least 2 seconds.
Commit takes at least 3 seconds (even with magit-diff-refine-hunk set to never)#2022-02-2209:33practicalli-johnnyI haven't noticed any speed problems in general.
There are some slow cases when committing changes in a large JSON file
⢠figwheel-main build for GitHub pages
⢠really long config file for VSpaceCode
I assume this slow down is due to font locking the diffs.
I can run the profiler next time I use magit and share the numbers I get#2022-02-2209:35jumarPerfect, thanks -it's really painful for me - even for very small diffs#2022-02-2209:36jumarHow fast are typical operations like status, stash, commit for you?#2022-02-2209:44practicalli-johnnyNo noticeable slowdown except for the JSON cases mentioned before.
The only time I recall magit being slow was when Spacemacs included Magithub, but that seems like a long time ago. magit forge doesn't seem to affect performance, although downloading issues can take a second or so when manually invoking an issue update
I think I have these variables set
https://practical.li/spacemacs/source-control/forge-configuration.html#configure-the-number-of-open-and-closed-topics-shown-in-forge#2022-02-2209:55jumarOk, thanks.
When you say "no noticable slowdown" what does that mean?
Does status, stash, commit and similar operations complete within a second? two seconds? more?#2022-02-2209:56jumarBtw. it's somewhat faster after I upgraded emacs (just tiny version upgrade) and all the packages.
I also kept magit-diff-refine-hunk var set to t (selected).#2022-02-2210:25practicalli-johnnyAll magit actions happen pretty much instantaneously, no noticeable delay (so much less than a second).
I ran the Emacs profiler and magit status hit about 20% cpu briefly. In the time it took to refresh the profile report it was back to 0%#2022-02-2210:26practicalli-johnnyMy spacemacs git layer configuration is
(git :variables
git-magit-status-fullscreen t
magit-diff-refine-hunk t
git-enable-magit-todos-plugin t)
#2022-02-2210:29practicalli-johnnyIn .spacemacs dotspacemacs/user-config I have the following to ensure closed issues are not included for magit forge. But this should only be an issue when pulling issue uptates, @ f f in magit status.
(setq forge-topic-list-limit '(100 . -10))
#2022-02-2210:31practicalli-johnnyI have git version 2.23.0 installed (2.35.1 is the latest available), so fairly recent.
Magit emacs package is magit-20220203.2302 , so I must have updated after 3rd of February 2020#2022-02-2210:33practicalli-johnnyAnother aspect could be the Clojure project itself, especially if its a very very large project. If the slowness is happening on all projects then its probably some Emacs / magit issue#2022-02-2313:35jumarI've just tried on a smaller project (https://github.com/jumarko/clojure-experiments/) and it's faster - but still far from "instanteneous"; perhaps 1.5-2 seconds#2022-02-2314:08jumarI studied a few resources, notably https://jakemccrary.com/blog/2020/11/14/speeding-up-magit,
and learned about magit-refresh-verbose
After implementing the suggestion the time went down from 2.5 seconds to less than a second!
Before:
Refreshing buffer 'magit: codescene'...
magit-insert-error-header 9.9e-05
magit-insert-diff-filter-header 0.033033 !!
magit-insert-head-branch-header 0.097403 !!
magit-insert-upstream-branch-header 0.000375
magit-insert-push-branch-header 0.066162 !!
magit-insert-tags-header 0.459343 !!
magit-insert-status-headers 0.70068 !!
magit-insert-merge-log 0.028536 !
magit-insert-rebase-sequence 0.000688
magit-insert-am-sequence 0.000169
magit-insert-sequencer-sequence 0.000325
magit-insert-bisect-output 0.000172
magit-insert-bisect-rest 4.4e-05
magit-insert-bisect-log 4.5e-05
magit-insert-untracked-files 0.887013 !!
magit-insert-unstaged-changes 0.119067 !!
magit-insert-staged-changes 0.068917 !!
magit-insert-stashes 0.145984 !!
magit-insert-unpushed-to-pushremote 0.166327 !!
magit-insert-unpushed-to-upstream-or-recent 0.112718 !!
magit-insert-unpulled-from-pushremote 0.084049 !!
magit-insert-unpulled-from-upstream 3e-06
forge-insert-pullreqs 0.049881 !!
forge-insert-issues 9e-06
Refreshing buffer 'magit: codescene'...done (2.482s)
AFTER:
Refreshing buffer 'magit: codescene'...
magit-insert-merge-log 0.032955 !!
magit-insert-rebase-sequence 0.000745
magit-insert-am-sequence 0.000161
magit-insert-sequencer-sequence 0.001377
magit-insert-bisect-output 0.000163
magit-insert-bisect-rest 5.1e-05
magit-insert-bisect-log 4.4e-05
magit-insert-untracked-files 0.407428 !!
magit-insert-unstaged-changes 0.121312 !!
magit-insert-staged-changes 0.073821 !!
magit-insert-stashes 0.147271 !!
forge-insert-pullreqs 0.039658 !!
forge-insert-issues 5e-06
Refreshing buffer 'magit: codescene'...done (0.908s)
#2022-02-2314:16jumarThis was also helpful: https://magit.vc/manual/magit/Performance.html#Committing-Performance-1
(remove-hook 'server-switch-hook 'magit-commit-diff)
#2022-02-2811:34daboone72Hi all how do I get around the dreaded "Symbol's function definition is void: which-key-declare-prefixes"#2022-02-2811:35daboone72Well a clue from here https://github.com/syl20bnr/spacemacs/issues/14936 suggests using develop branch ok well its' a new install since going 27.2#2022-02-2812:06practicalli-johnnyI dont have a specific answer, although to me it seems this occurs when something in a package has changed or broken. This should only happen after a package update and sometimes an Emacs restart fixes the issue.
When this occurs I go through the usual trouble shooting steps
https://practical.li/spacemacs/install-spacemacs/troubleshooting.html
If they dont work, then I raise an issue on the Spacemacs repository#2022-02-2812:07practicalli-johnnyNew Spacemacs PR to clarify the documentation in the GitHub layer, specifically the configuration for Git to access GitHub
Feedback on the PR most welcome
https://github.com/syl20bnr/spacemacs/pull/15381#2022-02-2822:09practicalli-johnnyThere is an interesting discussion on the PR regarding security of the access token. I've added a minor workaround to the layer documentation and updated the https://practical.li/spacemacs/source-control/
There is also discussion of removing github-clone.el package as it provides only a repository search on top of features otherwise available in Magit#2022-02-2816:15daboone72@jr0cket Actually Jon think I'd like to start with your spacemacs config and then add a few extra layers#2022-02-2817:21practicalli-johnnyLet me know if something isn't clear. I am always looking to move improve things.#2022-02-2822:09practicalli-johnnyThere is an interesting discussion on the PR regarding security of the access token. I've added a minor workaround to the layer documentation and updated the https://practical.li/spacemacs/source-control/
There is also discussion of removing github-clone.el package as it provides only a repository search on top of features otherwise available in Magit#2022-03-0113:56practicalli-johnnyAfter looking at the github layer, it seems that layer is fairly redundant. I've proposed moving the github layer in this PR
https://github.com/syl20bnr/spacemacs/pull/15381#issuecomment-1055465851#2022-03-0211:33practicalli-johnnyI've created another PR on Spacemacs repository to https://github.com/syl20bnr/spacemacs/pull/15388. Feedback is welcome.
If you are using Magit with GitHub / GitLab (or hosted versions of these services), then you can view, create, update Issues and Pull Requests from within Magit Status buffer using the`@` key binding
The PR is a summary of the https://practical.li/spacemacs/source-control/forge-configuration.html.#2022-03-0216:22practicalli-johnnyI've removed the github layer from the https://github.com/practicalli/spacemacs.d configuration, as the github layer doesnt really add anything over the git layer. If you used Grip to preview GitHub flavoured markdown, then you should keep the github layer.#2022-03-0415:35jumarI'm trying spacemacs/fzf-find-files but as soon as I invoke the action it fails with FZF exited with code 2
How can I identify what's the problem?
Of course, fzf works just fine in my terminal.#2022-03-0415:39practicalli-johnnyI dont have that command. Do you know what package it comes from ?#2022-03-0415:44jumarIt's a command line tool I installed a long time ago: https://sourabhbajaj.com/mac-setup/iTerm/fzf.html
For spacemacs, there's fzf layer: https://github.com/AshyIsMe/fzf-spacemacs-layer
I don't think I've done any special installation just added the layer to my dotspacemacs-configuration-layers#2022-03-0415:58practicalli-johnnyAh, its a community layer, not part of Spacemacs itself.
Looking at the code, it only seems to add a few functions and bindings and hasnt changed in 4 years, so not much to go wrong#2022-03-0416:51practicalli-johnnyIs fzf command line tool still on the Emacs path? SPC f e e should show the path and other environment variables.
Its the only thing I can think of.#2022-03-0416:54jumarfrom emacs env:
PATH=...:/usr/local/bin:...
from the terminal:
$ which fzf
/usr/local/bin/fzf
#2022-03-0517:22daboone72This is probably an old debate but I wonder what folks are doing about ligatures aka Fira Code?#2022-03-0517:23daboone72From here https://github.com/mickeynp/ligature.el There seems to be two options back port a fix to 27.1 or 27.2 or run emacs 28 via snapd?#2022-03-0517:24daboone72The error I see is
Skipping rebuild of /home/daniel-lower/.emacs.d/.cache/quelpa/packages/ligature-20220213.1525.el
(Spacemacs) Error:
An error occurred while installing ligature (error: (error Package 'emacs-28' is unavailable))#2022-03-0523:00practicalli-johnny@danielplower I started getting an error with Emacs 27.1 and the Spacemacs Unicode layer, with ligature-set-ligatures not found after the latest package update. Not sure how relevant that is to the error you posted.
I installed https://launchpad.net/~ubuntu-elisp/+archive/ubuntu/ppa and the problem seems to disappear though (as well as making Spacemacs extremely fast)#2022-03-0523:26daboone72@jr0cket Thanks John I run a weird setup WSL with Ubuntu piping to Xming server for X at work at any rate. At home I can go more crazy with nightly builds as it's less mission critical. I am setting up for emacs 28 well like you've pointed out emacs 29 is already in the works so emacs 28 should get progressively more stable till it's officially released.#2022-03-0613:20Kris CWhy is (vi) word motion in Spacemacs different than in normal vi(m)? If a variable is camelCase, w moves by word (camel->Case). How can I disable that?#2022-03-0700:59jeff.terrellSPC t c#2022-03-0708:20Kris CThanks, @U056QFNM5, but how do I do it permanently in configuration?#2022-03-0713:47jeff.terrellI did SPC h d k SPC t c to figure out which emacs function gets called with the SPC t c key sequence. It's spacemacs/toggle-camel-case-motion. If I search similarly-named functions with SPC SPC toggle-camel, it looks like there are some likely options, including a global variant bound to SPC t C-c. Worst case you could add a function call to your dotspacemacs/user-init (in you .spacemacs file).#2022-03-0713:51Kris CThanks!#2022-03-0700:47Drew Verleewhen i try to do a project wide search i get "option ignore is ambiguous...." instead of the expected search results.#2022-03-0701:02jeff.terrellSpacemacs doesn't have a lot of smarts about how it calls the underlying searchers like ack, pt, ag, etc (see the SPC s menu for the list). This means that sometimes you mean to search for things but you're accidentally passing options to the searcher. (Try prefixing your search with --, which is an old unix CLI trick. Dunno if that will help; just a guess.) This is frustrating at times but also can be powerful to be able to easily change the options on the fly.#2022-03-0701:07practicalli-johnnyCan you share the search pattern used?
And which search tool you have installed
I use ripgrep and haven't had too many problems, although the odd special character can confuse the search too.
These are the options I know about, which should work for ripgrep and ag
https://practical.li/spacemacs/spacemacs-basics/working-with-projects/searching-projects.html#searching-specific-files#2022-03-0701:42Drew Verleeit happens for all patterns. I'll install ripgrep, im using my labtop so thats likely the issue. thanks john#2022-03-0701:42Drew Verleethanks jeff ill try that#2022-03-0701:44Drew Verleeinstall ripgrep fixed it. thanks again š#2022-03-0718:43practicalli-johnnyI've updated https://practical.li/spacemacs/spacemacs-basics/working-with-projects/searching-projects.html with example of using the -A option which will show the specified number of additional lines after each matching line.
There is also a screenshot of the error that occurs if using an option without a valid value (i.e. missing a glob pattern from -g). This is because Spacemacs sends the pattern to the search binary as soon as you type characters.
I didn't get anywhere with --, although did discover that the pattern can be used before or after the options, which seems very handy#2022-03-0908:29jumarI have a problem with package-refresh-contents
First few times it just looked frozen on "Contacting host: melpa" so I C-g-ed it.
Now it looks more responsive but I got an error
Contacting host: [2 times]
Contacting host:
Contacting host: [2 times]
...
error in process sentinel: Error retrieving: (error connection-failed "connect" :host "" :service 443) [2 times]
#2022-03-0910:33practicalli-johnnyIt could be Melpa itself that is having problems. It's rare, but it happens.#2022-03-0911:55jumarYeah, it keeps happening.#2022-03-0912:45practicalli-johnnyI assume your not behind a firewall that doesn't like passing HTTPS connections?#2022-03-1006:10Drew Verlee443 means you tried to use https but something in the network didn't allow it.
Is what i read online just now.#2022-03-1007:44practicalli-johnny443 is the port that is used to connect to Melpa to download the packages. I don't believe it's a status code, as there doesn't seem to be a http status code of that value.#2022-03-1007:47practicalli-johnnyIf there are still issues connecting to Melpa, then try using http rather than HTTPS by running Emacs with the --insecure flag
emacs --insecure
This is not a good practice long term, so try find out what is blocking the HTTPS connection.
If it's at work, perhaps they have made changes to the company firewall#2022-03-1007:52jumarYeah, I don't want to do that.
I also posted this in #emacs : https://clojurians.slack.com/archives/C099W16KZ/p1646898664139849#2022-03-1007:53jumarI would think it's possible that it's a certificate issue but it's weird that emacs says nothing about it.#2022-03-1007:55jumarOh, it looks different now!
In *Messages*
Importing package-keyring.gpg...done
Contacting host: [2 times]
Contacting host:
Contacting host: [2 times]
Package refresh done
Looks like it succeeded but the minibuffer isn't updated (still shows "Contacting host: https://melpa.org:443"#2022-03-1007:56practicalli-johnnyI think certificate issues affected early versions of Emacs 26. Later Emacs 26 and Emacs27 onwards should be fine.#2022-03-1008:02practicalli-johnnyWhen I did a package update just now, I get the following output
(Spacemacs) --> refreshing package archive: melpa... [1/3]
Contacting host:
Importing package-keyring.gpg...done
Contacting host: [2 times]
Package refresh done
(Spacemacs) --> refreshing package archive: gnu... [2/3]
Importing package-keyring.gpg...done
Contacting host:
Package refresh done
(Spacemacs) --> refreshing package archive: nongnu... [3/3]
Importing package-keyring.gpg...done
Contacting host:
Package refresh done
This is then followed by fetch, update and prepare messages for each package that has a newer version#2022-03-1008:26jumarOk, that looks like more stuff than I have in my messages buffer but I really looks like it's just the minibuffer that isn't working/refreshed (at this point)#2022-03-1120:44Drew Verleei'm not getting any form of function documentation through emacs on my cljs shadow app. lsp or cider
⢠cider-doc-lookup: Symbol clojure.core/group-by not resolved
⢠lsp just returns blank
any ideas?#2022-03-1121:07practicalli-johnnyMy only thought would be a classpath issue or something very unusual with the project dependencies (but that seems unlikely)#2022-03-1121:08Diego NayaHi @U0DJ4T5U1, I assume you have the lastest cider package right?#2022-03-1121:31Drew Verleeill check my package version. Sometimes just a restart fixes everything š#2022-03-1715:25Drew VerleeHow would i search project wide for the word currently under my cursor? I don't see anything here https://practical.li/spacemacs/navigating-code/ looking through the spacemacs docs ...#2022-03-1720:54practicalli-johnnySelected words are used by the project wise search
SPC v to select the current word
SPC / to search with the highlighted word as the default patter, which can then be edited#2022-03-1715:25Drew Verleespace *#2022-03-1715:26Drew Verleei didn't understand the description at first glance#2022-03-1715:27alexdavisspace * should work I think (at least it does for me)#2022-03-1715:43Mario C.@drewverlee I usually do SPC s h to highlight word and get into the Symbol Highlight Transient State then do a / and it will search project wide#2022-03-1715:44Mario C.space * is new for me but looks like it works too :thumbsup:#2022-03-1715:46Drew Verleethanks alex and mario. ill try spc s h to.#2022-03-1715:46Drew Verleeany cool tricks you picked up in the last year that really helped with clojure development?#2022-03-1716:48alexdavisGetting lsp setup is a big one, some weirdness comes with it sometimes but overall it unlocks a lot of cool stuff#2022-03-1716:49alexdavisI use , g g to jump to definitions of functions/variables and then , g b to jump back all the time#2022-03-1716:50alexdavisalso , g s to get a searchable list of symbols in the project#2022-03-1717:31ericdalloI don't use spaceemacs, I use doom-emacs, IMO there are things to improve on both about the need of those setups.
things like: add a variable to decide which completion use (cider or lsp), which definition-source use and thingsl ike that#2022-03-1720:54practicalli-johnnySelected words are used by the project wise search
SPC v to select the current word
SPC / to search with the highlighted word as the default patter, which can then be edited#2022-03-1722:15jumarI use SPC * all the time - that's typically the fastest way for me.
You can also do * f to search in a specific directory#2022-03-1723:41practicalli-johnny# or * in Evil normal mode enters symbol highlight transient state, when the cursor is on a symbol.
/ then searches across the project
This is the smallest number of keys required
https://github.com/matthiasn/talk-transcripts/tree/master/Hickey_Rich#2022-03-2312:02maleghastMorning All š
Anyone got a good / reliable way to configure .gitignore to ignore ~undo-tree~ files under Spacemacs..?#2022-03-2314:47practicalli-johnnyDoes **/*.*~undo-tree~ work?
I assume this is related to the https://clojurians.slack.com/archives/C099W16KZ/p1647955414427979#2022-03-2314:48practicalli-johnnyThe undo history could be switched off in .spacemacs dotspacemacs/user-config using
(setq undo-tree-auto-save-history nil)
#2022-03-2314:52practicalli-johnnyOr set the directory for the undo-tree history files
(setq undo-tree-history-directory-alist '(("." . "~/var/emacs/undo")))
#2022-03-2315:38maleghastThanks @U05254DQM I will turn it off I think!#2022-03-2413:11GunnarTurn it off? š¬ Just saying: I recently lost about 2h of tinkering with code in VSCode because something screwed up and I didn't have (enough) undo ability to get it back. I'm used to in VIM to basically never lose anything. So... that episode plus that I am getting increasingly annoyed with some incorrect behavior in the VIM emulation on certain details, is why I'm now looking at Spacemacs again. (I used SM a bit a while back, not for clojure though).
To each his own, but I will need forever persistent, unlimited undo š#2022-03-2413:16GunnarQuick poll: (Because I'm really curious, and maybe others are too š )
How many people use vi keybindings and how many prefer the emacs bindings, when using Spacemacs?
If you want to participate (make your team win! š), click on emojis emacsor vim below.#2022-03-2420:17Drew Verleehow many secretly feel ashamed they use vim keybindings more then lisp movement keys? š#2022-03-2509:20GunnarYay, there's one Emacs person now! At least it wasn't a totally useless question then! š
The number of subscribers to this channel blew me away. 635! OK, so in one day about 1.5% of the number of subscribers have answered my poll. š„²#2022-03-2509:48practicalli-johnnyI am very thankful I took the time to learn vim style editing. It did take a few weeks for it to become natural, but it has made interacting with Spacemacs so much faster.
I often use Vim style key bindings instead of the smartparens commands, especially wrapping things in parens.
Outside of editing a file, the Spacemacs mnemonic key bindings are the same for Evil and Emacs, only with different leader keys. This is the reason I adopted Spacemacs, as I found the Emacs chorded keys for packages (i.e. Cider) to be really confusing and hard to remember#2022-03-2510:00Kris CI am using Vim style editing in every editor/ide. They all support it impeccably...#2022-03-2804:19WestI love the lisp interaction mode SPC k. I use it all the time for wrapping, slurping, and barfing.#2022-03-2915:35zaneDoomās evaluation function +eval:region (build to g r by default) is awesome because it accepts text objects / motions. No more navigating to the end of a form to evaluate it, and no need to remember arbitrary key bindings. You can just use the Vim motions you already know.
⢠g r a f evaluate function definition around point
⢠g r a b evaluate parenthesized expression around point
⢠g r i o evaluate symbol at point
⢠g r a g evaluate entire file
You can even combine it with things like https://github.com/hlissner/evil-snipe:
⢠g r g s j select a line below point and evaluate everything from point to there
Not sure if something similar exists for Spacemacs, but if it does I highly recommend trying it! Wouldnāt be too hard to port to Spacemacs if it doesnāt already exist, I imagine.#2022-03-2916:21Drew VerleeThanks zane, those options exist in the default space emacs setup with the clojure package.#2022-03-2919:45practicalli-johnnyCider can evaluate many different parts of a nested or top level form, without the need to move the cursor to select the context.
In Spacemacs they are all bound under , e for evaluation#2022-03-2919:52practicalli-johnnyI am unclear why anyone would ever need to navigate to the end of an expression just to evaluate it, unless they are using something other than Cider perhaps.#2022-03-2921:06zaneYeah. Lots of people get started with just eval-last-sexp, particularly those coming from other Lisps.#2022-03-2921:09zaneIāve found the ability to use an arbitrary text object / motion to be significantly more useful, powerful, and easy to remember than the fixed list of evaluation functions that Spacemacs provides. Your mileage may vary, of course!#2022-03-2921:17zane@U0DJ4T5U1 Thereās a Spacemacs equivalent to the evil-snipe example?#2022-03-2921:21Drew VerleeYea#2022-03-2921:21Drew VerleeI believe so, eval up to ... Or something#2022-03-2921:21Drew VerleeI don't think to use it very often though#2022-03-2921:23zaneI see. You can snipe with motions other than j though. For example, g s s for evil-avy-goto-char-2 to eval from point up to an arbitrary two-character sequence.#2022-03-2921:31zaneYou can also use numeric prefixes the same way you would with other Vim commands.#2022-03-2921:32zanee.x.
⢠5 j move five lines down
⢠5 d j delete the next five lines
⢠5 g s j eval the next five lines#2022-04-0513:34GunnarThanks to those who answered. 17 answers, at the time of writing, is a very small sample, but maybe VIM-style editing is an overwhelming reason for people to choose Spacemacs and that it just seems a given choice to most. The thread took a bit of a turn, but not a problem š . Cheers.#2022-03-2420:18Drew Verleewhen looking at unstated and stated changes in magit is it possible to Stash by hunk or file? I selected a file and tried "stash" and it stashed everything.#2022-03-2420:23jeff.terrellI think you can stage some changes and then stash only the staged changes. Not sure though.#2022-03-2422:12Drew Verleethats a good point, in this case i already had staged pieces i wanted to stage though.#2022-03-2509:27GunnarThat's a weird way of doing it, if it is supported that way. Normal git stash stashes all changes, not taking into account what has been staged or not. It's been a while since I used magit but I would be really surprised if magit did not support the equivalent of the corresponding git command (git stash --patch) since I remember it as being very full-featured!#2022-03-2509:38practicalli-johnnyI don't think Git supports exactly what your asking for.
It's possible to stash just the index (all currently staged changes) without staging untracked files.
It's not clear from the Git docs what should happen to unstaged files.
There is a patch option in stash that allows interactive selection of hunks from the working tree, but also includes the current index (already staged changes).
I typically just stash everything#2022-03-2513:12jeff.terrellYeah it seems like you'd need a second index (a.k.a. staging area) to do what you're trying to do.
I think what I'd do in your case is stash just the index to get it out of the way (making sure nothing you want to stash is staged), then stage what you want to stash, then stash the index again, then apply and drop the first stash (i.e. the second on the stack).#2022-03-2515:28Mario C.I had the same question a few days ago actually. Made large changes and decided to split the work into two smaller PR's. I wanted to stage some stuff but wanted to stash the others. One particular hunk had both changes i wanted to stage and stash. Luckily, I found out that in magit you could highlight the parts of the hunk you want to stage. So I ended up staging the stuff I wanted, made a WIP commit then stashed everything else. Then reset the HEAD by 1 commit. Maybe that helps š¤·#2022-03-2522:10GunnarHonestly, I feel the added info complicates things unnecessarily:
> Exactly what you are asking for
I didn't feel it was as clear what he was asking for*... but agree that git might not support what others suggested in the answers.
> *"when looking at unstated and stated changes in magit is it possible to Stash by hunk or file?"
I read the simplest interpretation of the question, and therefore the answer, that -p(atch) does what was requested -> stash by hunk, looking at all changes whether staged or not, so does magit not do that the same as plain git?
Does it answer what you want @U0DJ4T5U1, or can you clarify with an example?
If it is anything like the scenario you mention @UB0S1GF47 I think the easiest thing is to stash what you want to stash using -p(atch). Then you can stage/commit what is left. I'd say, don't worry about what you have placed in the staging/index or not. If you happen to have stuff in the index when you start, it's still easy to stash -p anyway (which takes everything into account, and you can select hunks from there). You could of course reset index if that feels better, and start from there if that helps, but I'd guess it's not needed.#2022-03-2522:24GunnarGranted, I'm speaking of git and not magit, but I have never seen it provide less functionality.#2022-03-2522:31Gunnar> found out that in magit you could highlight the parts of the hunk you want to stage
Yes exactly. magit actually extending the user experience beyond what git does (sort of...) is what I remember making it amazingly good. In git command line you'd have to edit the patch for the hunk manually, then deal with whatever you edited out.#2022-03-2921:26Drew VerleeI haven't forgotten this, i just got massively distracted before i could come back to it. I'll try to catch up tomorrow, likely i can solve my (very minor) issue another way.#2022-04-0206:41Phil HuntMorning š#2022-04-0206:42Phil HuntI thought Iād give Spacemacs a try but when I attempt to do ' for sesman-start I get an error about wrong number of arguments? Common-lips Slime works fine and doesnāt do this, just Clojure.#2022-04-0206:50Phil HuntDoing it for M-x too, āwrong number of argumentsā#2022-04-0206:55Phil Huntlooks like itās Helm. Replacing Helm with Ivy made it go away.#2022-04-0214:55GunnarHad the same just the other day and it seemed helm related, maybe...
SPC SPC (Helm M-x fuzzy match) failed with the complaint about wrong number of arguments. I just selected Rollback package update from the main page and it went away, and I have not looked any deeper at it.
If anyone else can confirm the same behavior, or know that this is some recent regression/problem (and if it is fixed?), then please comment.#2022-04-0312:19Phil HuntIt went away when I updated everything. Git pull on Spacemacs saw a few changes.#2022-04-0313:44GunnarOK, I will try updating again soon and hopefully it was some small regression that was quickly fixed so it is not my own mistake.#2022-04-0207:14Martynas MHey guys. Does anybody know why this one works:
(with-eval-after-load 'typescript-mode
(spacemacs/set-leader-keys-for-major-mode 'typescript-mode "gb" 'previous-buffer))
And this one doesn't? (for tsx major mode)
(with-eval-after-load 'typescript-tsx-mode
(spacemacs/set-leader-keys-for-major-mode 'typescript-tsx-mode "gb" 'previous-buffer)
(spacemacs/set-leader-keys-for-major-mode 'typescript-mode "gm" 'previous-buffer))
I also opened this github issue:
https://github.com/syl20bnr/spacemacs/issues/15442
For some reason it worked when I removed with-eval-after-load. Probably there is some kind of a callback listener problem.#2022-04-0207:26practicalli-johnnyThe issue has no layer information, so no idea how the layer has been set up. Sorry, I don't have info to help#2022-04-0207:27Martynas MOh. How does one get package info?#2022-04-0207:31Martynas MIf I run pkg-info-package-version and then look for tsx and typescript-tsx then I find no matches.
But typescript gives this:
0.4 (package: #2022-04-0209:07practicalli-johnnyThe process to create a useful issues is described in the issue template, I.e. the text that is populated automatically when an issue is created on GitHub.
This describes how to create a GitHub issue from Spacemacs itself, using SPC h I#2022-04-0213:03Martynas MI included the details from SPC h I.#2022-04-0305:35Martynas MSolved.#2022-04-0304:50happyb3atHowto make spacemacs show menu-bar on startup? Adding (menu-bar-mode t) to user-config gets ignored?#2022-04-0307:28Martynas MI have never used menu bar and didn't even know what it was for spacemacs. Instead I press Alt+x and search for a command.#2022-04-0311:30practicalli-johnny(menu-bar-mode 1) should be added to the dotspacemacs/user-config section of .spacemacs configuration file to enable the Emacs menu on startup.
Or press F10 key to enable the Emacs menu when Emacs is running.
Be aware the Emacs menu is quite limited compared to the which-key menu via SPC , which provides a menonic guide to the large number of commands available for Emacs.#2022-04-0313:54happyb3atYeah i tried (menu-bar-mode 1) to in dotspacemacs/user-config does still doesnt work. If i do M-x (menu-bar-mode) it does show. Just cant make it show permanently???#2022-04-0314:01happyb3atthe menu bar does show briefly at startup but is then removed again#2022-04-0314:17practicalli-johnnyI assume something is disabling the Emacs menu after user-config is loaded, which is unusual as user-config is the last thing to load.
I assume there must be a hook somewhere in the Spacemacs code that disables the Emacs menu.
Suggest searching the Spacemacs code for menu-bar-mode
I can take a quick look tomorrow if you can't find anything,
but I really don't think it's worth doing#2022-04-0314:19happyb3atin core-early-funcs.el#2022-04-0314:19happyb3at(defun spacemacs/removes-gui-elements ()
"Remove the menu bar, tool bar and scroll bars."
;; removes the GUI elements
(when (and (fboundp 'scroll-bar-mode) (not (eq scroll-bar-mode -1)))
(scroll-bar-mode -1))
(when (and (fboundp 'tool-bar-mode) (not (eq tool-bar-mode -1)))
(tool-bar-mode -1))
(unless (memq (window-system) '(mac ns))
(when (and (fboundp 'menu-bar-mode) (not (eq menu-bar-mode -1)))
(menu-bar-mode -1)))
;; tooltips in echo-aera
(when (and (fboundp 'tooltip-mode) (not (eq tooltip-mode -1)))
(tooltip-mode -1)))#2022-04-0314:21happyb3atjust cant see why i cant undo that using a simple (menu-bar-mode 1) in user-config since that one is supposed to be run as the last thing.#2022-04-0314:24happyb3atIt gets called from core-spamacs.el
(defun spacemacs/init ()
"Perform startup initialization."
(setq command-line-args (spacemacs//parse-command-line command-line-args))
(when spacemacs-debugp (spacemacs/init-debug))
;; silence ad-handle-definition about advised functions getting redefined
(setq ad-redefinition-action 'accept)
;; this is for a smoother UX at startup (i.e. less graphical glitches)
(hidden-mode-line-mode)
(spacemacs/removes-gui-elements)#2022-04-0314:27happyb3atbut even if i uncomment that line and save the file still no mojo. Do i need to do more than uncomment the line in core-spacemacs.el and then save the file and then restart emacs? Could there be a byte compiled version of the .el file I need to compile in order to pickup the uncomment of that line?#2022-04-0314:30happyb3atcore-spacemacs.el dont contain the "shebang of no byte compile line" i.e. ;; -*-no-byte-compile: t; -*- #2022-04-0314:31happyb3atso really shouldnt be a compiled vs non compiled issue. but I am new elisp so maybe something I dont see š#2022-04-0317:48practicalli-johnnyI don't know anyone who has used the Emacs menus with any community configuration. It's usually the first thing turned off. They are not something I would find valuable.
I suggest creating your own Emacs configuration would be much more effective than changing design approach taken by Spacemacs and other configurations.#2022-04-0616:52Drew VerleeWhen i start emacs I can't do anything for about 20 seconds while it seems to do something relating to fonts
Unicode Fonts - Mapping Unicode Blocks in fontset-default ... done
Unicode Fonts - Mapping Overrides in fontset-default ... done
Unicode Fonts - Mapping Unicode Blocks in fontset-startup ... done
Unicode Fonts - Mapping Overrides in fontset-startup ... done
Unicode Fonts - Mapping Unicode Blocks in fontset-standard ... done
Unicode Fonts - Mapping Overrides in fontset-standard ... done
Starting new Ispell process /usr/bin/aspell with default dictionary...done
#2022-04-0616:56Drew Verleein my init file I see the following config which might be related
;; Support font ligatures (fancy symbols) in all modes
;; 'prog-mode for only programming languages
;; including text-mode may cause issues with org-mode and magit
(unicode-fonts :variables
unicode-fonts-enable-ligatures t
unicode-fonts-ligature-modes '(prog-mode))
commenting that out seems to stop the "Mapping" at startup. Not sure what it was doing for me though š. Well as the comment suggested, my fancy symbols went away. A great darkness has come upon me.#2022-04-0618:08practicalli-johnnyI have seen similar messages and startup time extended, usually after restarting Emacs following a package upgrade.
I dont remember seeing the messages at other times, but I rarely restart Emacs outside of a package update (which can be months)#2022-04-0618:14practicalli-johnnyThe unicode layer includes a cache, so the font mappings should only update (at Emacs startup) when a font is added or removed, or relevant configuration options are changed.
So the mapping shouldnt happen on each Emacs restart.#2022-04-0618:17practicalli-johnnyIs your OS updating fonts when you are not looking?#2022-04-0618:19practicalli-johnnyIn the unicode-fonts emacs package, it suggests using customize in Emacs to remove fonts, which may improve startup time
https://github.com/rolandwalker/unicode-fonts#startup-speed
I havent tried this myself...#2022-04-0619:57Drew Verleei'll take a look, sometimes these issues just disappear after another round of updates š#2022-05-0510:23practicalli-johnnyI am seeing this unicode-font issue more as I have been restarting Emacs more often recently. I raised an issue to see if anyone else has ideas
https://github.com/syl20bnr/spacemacs/issues/15498#2022-05-0513:06practicalli-johnnyI built Emacs 28.1 from source (https://github.com/practicalli/blog/issues/129) and it doesnt have the issue with Unicode
These are the steps I took to build Emacs: https://github.com/practicalli/blog/issues/129#2022-05-0519:31Drew Verlee@U0E98NQG2 I'll give this a try, as i still don't feel like things are as stable for me as as i get the feeling they are for others.#2022-05-0520:33johanatanWas that meant for me? #2022-05-0520:34Drew VerleeIt wasn't, sorry.#2022-05-0520:44Drew VerleeI didn't ask him anything, i think he was trying to see if a different build had an issue.
Meanwhile i keep getting small bugs here and there with how i installed emacs. So part of me was thinking this installation might be better. I didn't look into it much, so I'm probably getting ahead of myself.#2022-04-0619:57practicalli-johnnyFYI. the latest magit package has changed they way key bindings are defined and this clashes with evil-surround, so using v and s to stage individual lines of a hunk does not currently work. The change was made 12 days ago, so any package earlier than that should work.
I simply copied the magit folder from the rollback directory into the elpa directory and restarted Emacs, seems to work okay, although a proper rollback is a safer approach
https://github.com/syl20bnr/spacemacs/issues/15448#2022-04-0717:07sgepigonSmall workaround I found is to call magit-dispatch (with ? key) then do s.
So steps are:
1. highlight lines
2. ?
3. s.
Itās a bit clunky so rolling back makes a lot of sense too.#2022-04-0823:56practicalli-johnnyA nice little work around, thanks.
It seems the plan is to turn off evil-surround globally and only enable it for specific modes.
Therefore toggle evil-surround off seems to work
SPC SPC evil-surround-mode in the magit status buffer allows staging of a region within a hunk#2022-04-1117:31practicalli-johnnyA pull request has been created to remove evil-surround from the git (Magit) layer. This will resolve the issue with the latest magit release
https://github.com/syl20bnr/spacemacs/pull/15462#2022-04-1420:54eggsyntaxThanks for figuring this out, yāall, just came looking to see if anyone was clear on what was going on. Cheers!#2022-04-1508:00practicalli-johnnyThe pull request has been merged to specify fix magit status.
There is a more general issue of evil-surround being globally on by default, whereas it should only be for text and programming modes.
There may be other modes where evil-surround is useful, if so then a comment on this issue will help
https://github.com/syl20bnr/spacemacs/issues/15463#2022-04-0903:14WestSeems like if I try evaluating (ns-publics overtone.live) it hangs up emacs for a super long time.
Looks like this is indeed a spacemacs issue, as I don't seem to have this issue when I run in lsp-mode or cider on my minimal config.#2022-04-0910:37practicalli-johnnyIs there a Clojure project or code example / setup that I can try reproduce the issue?
What OS is this on? I seem to recall different audio setups between Linux, Macos, etc
It's been a decade since I did overtone, the main problems I had were with the audio interface on the operating system locking up randomly#2022-04-1109:29WestThis is literally all you need to do in order to reproduce this.
I'm on Linux right now, I'd test on other OSes if I could.
(ns test-project.core
(:use [overtone.live]))
(ns-publics 'overtone.live)
#2022-04-1111:27practicalli-johnnySo can overtone work without running a jack Daemon now?
If not, what is the setup used?#2022-04-1111:35practicalli-johnnyHave you tried to require overtone with an alias instead of use?#2022-04-1111:36practicalli-johnnyI don't understand the last part of the question where you say the issue is not there when running LSP or Cider?#2022-04-1119:25practicalli-johnnyWhen `(:use [overtone.live]) is evaluated it will try start a local supercollider and try to connect to the jackd daemon (through alsa or pulseaudio, which ever has been set up - assume pulseaudio is needed on the last few years of Ubuntu Linux - that seems quite a fiddly setup)
If the connection to jackd fails, then the REPL process will most likely terminate (mine does).
Overtone is also quite sensitive to JVM options and wouldnt be surprised if there are issues if running a JVM other than from Java 8.
I am not able to get the server to run when using through the command line, so have no way at the moment to replicate this issue.
I would recommend uising https://ubuntustudio.org/ rather than Ubuntu to develop with Overtone, as it comes configured with jack.#2022-04-0911:38Martynas MDid anybody experience evil mode macro recording/replay issues?
They sometimes mess up what they output so I created this issue. Does anyone else have problems? They could be connected to mine:
https://github.com/syl20bnr/spacemacs/issues/15457#2022-04-1000:26FarisHi, how do I make line numbers absolute instead of relative? I found this in core-dotspacemacs.el
(spacemacs|defc dotspacemacs-line-numbers nil
"Control line numbers activation.
If set to `t' or `relative' line numbers are turned on in all `prog-mode' and
`text-mode' derivatives. If set to `relative', line numbers are relative.
This variable can also be set to a property list for finer control:
'(:relative nil
:disabled-for-modes dired-mode
doc-view-mode
markdown-mode
org-mode
pdf-view-mode
text-mode
:size-limit-kb 1000)
The property `:enabled-for-modes' takes priority over `:disabled-for-modes' and
restricts line-number to the specified list of major-mode."
'(choice boolean
(const relative)
(const visual)
(const prog-mode)
(repeat sexp))
'spacemacs-dotspacemacs-init)
But changing the value to t doesnāt seem to do anything even after restarting.#2022-04-1008:47practicalli-johnnyDid you change the value in the code above or in the setting in .spacemacs configuration file (which takes precedence)#2022-04-1014:02Farisfacepalm#2022-04-1014:02FarisOkay that was the issue. Thanks!!!#2022-04-1017:44practicalli-johnnyThere are a lot of default settings (with useful descriptions) in the .spacemacs configuration file. It's worth a read (or a search)#2022-04-1213:55Martynas MHey. I found that there is a shortcut to evaluate an expression in cider.
SPC m e e evaluates an expresssion that is before the cursor. Is there a way to evaluate an expression that is one symbol further?
i.e. an expression that ends one symbol after the cursor? Otherwise it could work the same.
Example:
'(1 2 3 [4] 5)
The [] signifies where block cursor is located. It highlights whole character 4.
In this example SPC m e e would evaluate 3 but I want to evaluate 4.
And this is a more complicated example where I want to evaluate a longer function name:
(map [i]nc '(1 2 3)) => map
So the cursor is located on i letter but it would evaluate function map instead of inc. I would like to make it so that it would evaluate inc.
But if I go one symbol further SPC m e e evaluates inc:
(map i[n]c '(1 2 3)) => inc#2022-04-1214:01Martynas MI found that there is a channel #cider and I pasted it there too:
https://clojurians.slack.com/archives/C0617A8PQ/p1649772039695489#2022-04-1214:05Martynas MSPC m e v was what I was looking for š#2022-04-1214:08Martynas MI was using vab to select the () form and I'll use SPC m e ( as a replacement for this. Maybe SPC m e f too as I don't see much difference between them.
And then to evaluate only a function I'll use SPC m e v
My leader key is set to - so I instead will have - e v and - e (.
I use vim style of editing and , is a search repeat key (repeat line symbol search). This was the first thing that I changed in the config long time ago š#2022-04-1214:12Martynas MIt would also be nice to have SPC m e [ and SPC m e {... hm. I'll ask about it in CIDER chat#2022-04-1214:15Martynas MSPC m does the same as pressing a leader key and my leader key is not , so I was mentioning the full form where possible.
My leader keys is -#2022-04-1215:53Martynas M;; CIDER evaluation
(evil-define-operator mm-evil-eval-region-cider (beg end)
"Eval a text object and show in the buffer."
(cider-eval-region beg end))
(spacemacs/set-leader-keys-for-major-mode 'clojure-mode "ed" 'mm-evil-eval-region-cider)
(evil-define-operator mm-evil-eval-region-cider-popup (beg end)
"Eval a text object and show in the result buffer."
(cider--pprint-eval-form (list beg end)))
(spacemacs/set-leader-keys-for-major-mode 'clojure-mode "eD" 'mm-evil-eval-region-cider-popup)
What this does is you can press this keystroke: ,edab and it will evaluate whole () form. ab is a motion that selects whole () list. And then you can use all other motions of evil mode (`[]`, {}, word, paragraph etc).#2022-04-1302:51Drew VerleeWhat should i use for file operations such that my current buffer can be kept in sync.#2022-04-1302:51Drew Verleee.g i want to move a file, and have my buffer understand it was moved and update, and not prompt me to save the file.#2022-04-1304:34jumarWhat do you use right now?
I think dired is good for moving/renaming files.
I also use NeoTree.#2022-04-1306:39practicalli-johnnyI use SPC f R on a buffer to rename a file, moving it to a different place on the path. Saving the file will create any directories that don't already exist.
If it's a Clojure file, I would use LSP rename, , r r on the buffer namespace which should also move the file to the corresponding file path.
I am not aware of tools to manage buffers if files are moved outside of Emacs.#2022-04-1306:02Martynas MDoes anyone know about evil mode operators? I want to sent an output of a motion to a function and it works. But then my cursor jumps to the beginning of the motion and I want to leave it at the current (point). How do I do that?
It could also work if I'd be able to call the operator myself. But then I don't know the params. In this case I could try to use save-excursion.#2022-04-1306:09Martynas MFigured it out:
:move-point nil
#2022-04-1408:42Martynas MHey. I was fiddling with evil mode and I found that I could define my own text objects.
So I figured I'd define one for clojure's set. But there is a problem.
The matching mechanism accepts only one symbol and I want to use two: #{.
(evil-select-paren "#{" ?} beg end type count t)
More info:
https://github.com/emacs-evil/evil/blob/7e87b82660668cb10f1f9838ddd622abab1f7a62/evil-commands.el#L1336
Is there a way to make this work?#2022-04-1410:08Martynas MSetting both to strings solves this one#2022-04-2105:36Martynas MHey.
Is there a way to change the default template for a file type?
When I create a clojure _test.clj file I always get this content:
(ns my-ns.util-test
(:require [my-ns.util :as sut]
[clojure.test :as t]))
And the only thing that I change EVERY time is this line:
[clojure.test :as t] -> [clojure.test :refer :all]
This is what I do in every test source file that I create.
Is it possible to change the template? I was trying to find it in .emacs.d but I couldn't find it.
How do I do it?#2022-04-2105:45Martynas MFound it.
Need to add this to config:
(defcustom cljr-clojure-test-declaration "[clojure.test :refer :all]"
"The require form to use when clojure.test is in use in a clj file."
:type 'string
:safe #'stringp)
(defcustom cljr-cljs-clojure-test-declaration "[cljs.test :refer :all :include-macros true]"
"The require form to use when cljs.test is in use in a cljs file."
:type 'string
:safe #'stringp)#2022-04-2213:13Kris CMy CIDER repl is only showing the last expression and result. What can I do to make it work like before, so it does not clear the buffer all the time?#2022-04-2214:16practicalli-johnny@U013100GJ14 there is a Clojure layer variable that will set the size of the REPL buffer history
cider-repl-buffer-size-limit 100 ;; limit lines shown in REPL buffer
100 is quite low although should still show results - unless you have more than 100 lines of results (in which case the Cider Inspector is much easier to work with.
I believe the default value is 1000, so if you have a lower number, either comment out the variable or change the number to a more suitable value for your needs.#2022-04-2214:19Kris CUh, that was it, thank you @U05254DQM#2022-04-2504:13jumarI've upgraded from emacs 27.2 to 28.1 and suddenly see a lot of files like ...~undo-tree~ in my project.
It seems that it's pretty normal: https://emacs.stackexchange.com/questions/51410/saving-undo-tree-to-restore-in-next-session
And I have added the pattern to my global gitignore.
But I'm wondering what has changed and if the previous version had a configuration that stored this files elsewhere?#2022-04-2509:24practicalli-johnnyUndo-tree defaults have changed.
To write these files to the cache directory instead, add the following to dotspacemacs/user-config in the Spacemacs configuration file
(setq undo-tree-history-directory-alist '(("." . "~/.emacs.d./.cache")))
Background discuss
https://github.com/syl20bnr/spacemacs/issues/15426#2022-04-2515:52practicalli-johnnyI updated Spacemacs today and its writing files to ~/.emacs.d/.cache/undo-tree-history/ directory, so the above configuration should not be needed#2022-04-2518:01jumarGreat, thanks John!#2022-04-2521:46otwieraczHey - do you know how to make spacemacs/jump-to-defintiion-other-window (and other stuff like that) split vertically (new window on the right) rather than horizontally?#2022-04-2620:49Drew VerleeWhat would allow for movement? Where my mouse is at and i want to go to *. Basically i'm one clojure hashmap key and i want to jump to the space to make another one?
{a* b **}
Space k <?>#2022-04-2620:50Drew Verleesp-end-of-sexp works if it's the last one...#2022-04-2620:51Drew Verleei guess i could just tab it down and start another item right there :0#2022-04-2620:52Drew Verleeprobably need at least two commands, i'm just over thinking it.
1. go to the next item then 2 insert new.#2022-04-2711:17Martynas MYou could try Ea<space> to insert:
{:hell[o] :one-thing :second :thing}
->
{:hello :one-thing | :second :thing}#2022-04-2711:22Martynas MAlso if you have newlines after each key-value pair the insertion is even simpler, just press A . I also like to use o and O very much.#2022-04-2711:33practicalli-johnny@U0DJ4T5U1 if using Evil style editing, in normal mode
] will jump to the end of the next value in key/value pair within a hash-map (`evil-cp-next-closing` )
[ will jump to the start of the previous value in a key/value pair within a hash-map (`evil-cp-previous-opening`)#2022-04-2711:52Martynas MI use develop and I don't have function evil-cp-next-closing . Do I need to do something to get it?
Also ] does nothing but ]] jumps to a next paragraph#2022-04-2712:18Martynas MI think this is your plugin: https://github.com/luxbock/evil-cleverparens
But I use } quite a bit when moving. So I'll have to read the docs.#2022-04-2714:27Drew VerleeI'll give those both a try. Thanks!#2022-04-2723:50Drew VerleeI'm using spacmemacs with evil, more specifically just a moded version of johns spacemacs init file š . With that ] jumps foward, but not to the next key. So maybe i'm not in "Evil styl editing?
I can do "next symbol" then closing though. Which is fine.#2022-04-2723:51Drew VerleeThis is why i mostly move around with vim keybindings, because even the half second of concentrated thought isn't worth the keystrokes.#2022-04-2623:40jeff.terrell2W?#2022-04-2700:59jeff.terrellf} or t}?#2022-04-2711:16Martynas MDoes anybody know why macro recorder has this strange macro recorder issue? Does anybody experience it too?
https://github.com/syl20bnr/spacemacs/issues/15457#2022-04-2713:40Martynas MHow do I prevent printing into the result buffer? It prints half of the result and then prints the texts in the middle. It's completely unreadable.#2022-04-2811:34murtaza52I updated my packages yesterday (manjaro linux), my emacs version is 28.1, and now spacemacs no longer works - the error I get is No such file or directory use-package I tried reinstalling spacemacs, did not work, any leads on how to debug this ?#2022-04-2811:44practicalli-johnnyWas the .spacemacs file or .spacemac.d/ directory moved out of the way?
If they were, sounds like a manjaro issue. it could be a bad packaging of Emacs. Or maybe something important was split into another package
If using an earlier version of Emacs, the main difference is probably native compilation, so maybe some of those libraries are causing the issue.
I assumed you rebooted manjaro after updating its packages.
I'm using Spacemacs with Emacs 29.0.50 on Linux (Ubuntu) without any issues.#2022-04-2813:11murtaza52thanks, installed 29.0.5 and everything again, seems to be working now#2022-04-2812:54Ho0manHi everyone,
I need to set the DISPLAY environment variable for my spacemacs. In order to avoid getting https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwiGvvq45rb3AhUkhP0HHVbAAjEQFnoECAsQAQ&url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F10165761%2Fjava-cant-connect-to-x11-window-server-using-localhost10-0-as-the-value-of-t&usg=AOvVaw2gxFis9vJ0EYk8hwMx8GTB. How can I do that ? Adding it to .profile .bash/.zsh_rc or the likes doesn't seem to work.#2022-04-2815:58practicalli-johnnySPC f e e should open the .spacemacs.env file, environment variables can be added to that file for use in Emacs#2022-04-2816:30practicalli-johnnySPC f e E will reload the variables in that file and pick up any new variables from the file or the Operating System environment.
However, the Clojure REPL (or any Java Process) will need to be restarted to pick up an environment variables added (after that java process started).#2022-04-2816:33practicalli-johnnyI am not sure if this will work for DISPLAY environment variable though, its not clear to me from the link provided as what is actually requiring
I usually add something like DISPLAY to .bashrc for bash (and source .bashrc from .profile , or for Zsh I would add environment variables to .zshenv#2022-04-3013:54Ho0manIt worked. I added export DISPLAY= to .spacemacs.env
Thanks a lot @U05254DQM#2022-04-2901:19Brian Beckman? Spacemacs + clj-refactor problems ?
[SOLVED; ty @didibus and @jr0cket] Some documentation says that installing the clojure layer in Spacemacs automatically loads clj-refactor, but none of the cljr-blahblah functions show up in Meta-X. Then I read I should do (clojure :variables clojure-enable-clj-refactor t)) in the layer spec, but that sends Spacemacs into death-recovery mode. Then I tried installing the clj-refactor package in the Spacemacs place dotspacemacs-additional-packages and doing
(require 'clj-refactor)
(defun my-clojure-mode-hook ()
(clj-refactor-mode 1)
(yas-minor-mode 1)
(cljr-add-keybindings-with-prefix "C-c C-m")
)
(add-hook 'clojure-mode-hook #'my-clojure-mode-hook)
and various permutations of that in dotspacemacs/user-config, but still none of the cljr-blahblah functions show up.
any clues for me?#2022-04-2905:05didibusAll I have is:
(clojure :variables
clojure-backend 'cider
clojure-enable-clj-refactor t
clojure-enable-linters 'clj-kondo)
And I'm on the develop branch, and it works#2022-04-2908:41practicalli-johnnyThe official guide to the Clojure layer is at https://develop.spacemacs.org/layers/+lang/clojure/README.html#enabling-sayid-or-clj-refactor
Yes, @didibus is correct that clj-refactor and other features are optional on the layer.
Any http://www.spacemacs.org layer documentation is likely to be several years out of date, so the http://develop.spacemacs.org version should be used.
develop branch has been the default branch for a long time now, and the defacto branch used for many years.#2022-04-2908:42practicalli-johnnyYou could also refer to https://practical.li/spacemacs/ which uses the develop branch of Spacemacs#2022-04-2905:12Drew VerleeAnd for the weirdest bug i have ever come across. simple moving my mouse over this variable causes emacs to to use 100% cpu and crash#2022-04-2905:13Drew Verleei'm going to see if re-naming it does anything, just bc i have no idea what better to do.#2022-04-2905:16Drew Verleeyes. re-naming it means it doesn't crash. I can reliable crash emacs just with that specific name.#2022-04-2905:17Drew Verleehmmmm#2022-04-2905:17Drew Verleemaybe bc it starts with "comment"?#2022-04-2908:47practicalli-johnnyI wonder if its Emacs that is using the CPU or is Emacs blocked by a process it shelled out to that is using the CPU? e.g. clojure-lsp ?
Perhaps look at the spawned processes as the mouse moves over that name
https://practical.li/spacemacs/install-spacemacs/troubleshooting.html#issues-with-spawned-processes
If Emacs lsp-ui has the docs mouse over docs enabled, you may have found a bug with lsp-ui or possibly clojure-lsp#2022-05-0115:32ericdalloI don't think it's LSP related but you never know š
I suspect it could be related to clojure-mode or something, I suggest you toggle-debug-on-quit and when everything freezes or cause the issue hit C-g to get a stack where emacs was#2022-05-0118:53jacob.maineIāve had freezes too, always when interacting with functions whose name starts with ācommentā! For me, I donāt think it was on hover, though I canāt remember perfectly.
Iād also be surprised if itās clojure-lsp, since clojure-lsp operates primarily on tokens (i.e. the full function name), not parts of tokens. But you never know.#2022-05-0319:59practicalli-johnnyI've just sent the CPU to over 100% after typing in comment-selection which should have been a snippet that expanded, but it wasn't recognised as a snippet and now Emacs is keeping my laptop warm...
TAB or j with the cursor over comment sends the Emacs process into a frenzy...
C-g stops what ever process is using all the cpu...#2022-05-0320:02practicalli-johnnyInteresting. Logging the commands I get C-g pupo/close-window which seems to suggest that purpose-popwin is trying to do something.
Could the auto-completion be using purpose-powin to draw the popups and somehow be getting stuck trying to do something?#2022-05-0320:04ericdallonever heard of that package/function š which package calls it in the stack? lsp-mode/clojure-mode etc#2022-05-0320:06practicalli-johnnyThere is a backtrace here https://gist.github.com/practicalli-john/278b8d8ec30deab3fb162405dd2c98ad#2022-05-0320:07practicalli-johnnyline 38 has an lsp process#2022-05-0320:08ericdallostill, it seems to come from clojure--looking-at-non-logical-sexp , clojure-mode#2022-05-0320:09practicalli-johnnyI can instantly fix the issue by running lsp-workspace-shutdown#2022-05-0320:10practicalli-johnnybut then I dont have LSP anymore and I am sad š#2022-05-0320:11ericdalloprobably lsp is trying to do something that under the hood end up calling a clojure-mode function which causes that#2022-05-0320:11practicalli-johnnyseems like a case of clojure-mode conflicting with clojure-lsp in some strange way as it just doesnt happen with lsp disabled#2022-05-0320:11ericdalloso the fix would be on clojure-mode still#2022-05-0320:12ericdalloyeah, it's the lsp hover feature, which tries to color the token using the major mode, in this case clojure-mode, which seems that function has some performance regex issue#2022-05-0320:12ericdalloif you manage to repro calling that function manually, you could open a issue on clojure-mode#2022-05-0320:22practicalli-johnnyIs that the hover feature for docs, or for auto-complete (or are they the same thing)#2022-05-0320:22ericdallodocs#2022-05-0320:26practicalli-johnnyAh yes, if I disable docs popup completely then I do not get the lockup with lsp running. Initially I had disabled the docs popup for the cursor but not for mouse, so a little strange ciojure-mode is causing a lockup.
I will try and see if I can figure out something meaningful to report on clojure-mode
Thank you.#2022-05-0320:28ericdalloyeah, probably the issue is that the hover docs show markdown clojure code, and to color that markdown we call the major mode which knows how to color it, in this case clojure-mode#2022-05-0321:25practicalli-johnnyHmm, I has assumed there wouldnt be any docs for the piece of text by itself, i.e. comment-seperatoror (spelt incorrectly on purpose) yet lsp seems to be trying to font lock the markdown for it. Is this normal?
lsp--fontlock-with-mode("clojure\ncomment-separatoror\n\n\n----\n\n*[/home/..." lsp--render-markdown)
lsp--render-string("clojure\ncomment-separatoror\n\n\n----\n\n*[/home/..." "markdown")
lsp--render-element(#<hash-table equal 2/2 0x1591b67bd835>)
#f(compiled-function (contents server-id) #<bytecode 0x7a9334e0f6d7b8a>)(#<hash-table equal 2/2 0x1591b67bd835> clojure-lsp)
apply(#f(compiled-function (contents server-id) #<bytecode 0x7a9334e0f6d7b8a>) #<hash-table equal 2/2 0x1591b67bd835> clojure-lsp nil)
lsp-clients-extract-signature-on-hover(#<hash-table equal 2/2 0x1591b67bd835> clojure-lsp)
#2022-05-0321:26practicalli-johnnyOh, it seems like lsp is rendering docs for text, although if I change the text and hover over with the mouse the doc is for the previous text.. very strange..#2022-05-0321:29practicalli-johnnyThis is quite curious. Originally the text was comment-separatoror and then I change it to fish-and-chips and when I hover over with the mouse I get a doc with the previous text.#2022-05-0321:31ericdalloSounds like outdated analysis from clojure-lsp, although not related to the performance issue#2022-05-0321:44practicalli-johnnyI think its because the backtrace has stopped everything in Emacs. I guess that is how it works, first time I've tried to use it in a while. I've had to reboot emacs.#2022-04-3000:10Brian Beckman? javadoc and jdk sources in spacemacs ?
in this clever video https://www.youtube.com/watch?v=4ecC3jqHooc, Curious Programmer shows javadoc (around the 24:06 mark) in an emacs buffer, and jdk sources a few seconds later, again in an emacs buffer. In my installation, both javadoc and jdk sources are outside the emacs environment. When I find the cider-javadoc command, it opens Firefox. The cider āgoto sourceā command doesnāt know where I cloned the jdk sources.
How do I set them up like āCurious Programmerāsā environment? Iām using spacemacs with emacs keys; he is using VIM keys, so his keystrokes and bindings are no help to me.#2022-04-3005:05jumarI produced this video a long time ago. At that time it was, obviously, working for me.
I don't exactly remember but I might have added the JDK sources to classpath explicitly.
I've just tried it quickly and it doesn't seem to work for me, at least not for all projects - but I didn't add jdk sources to my classpath explicitly.
Now, there's this issue out there about this problem so perhaps check the comments there: https://github.com/clojure-emacs/cider/issues/2819#2022-04-3005:06jumarAlso, here has been some work related to enrich-classpath "plugin" which will automatically download javadocs and sources for all the 3rd party dependencies - not sure if that's enabled by default right now or not.
Maybe ask in #cider#2022-04-3010:24practicalli-johnnyhttps://practical.li/spacemacs/navigating-code/java-definitions.html#2022-05-0102:05Drew Verleethe function hinting im getting should be showing me the arguments. The name flickers which leads me to believe lsp and cider are competing. Any suggestions on which to use and how i can get more feedback about the fn? I feel like this was better a while back for me š#2022-05-0109:07practicalli-johnnyI have seen the name flickering on occasion, but hard to reproduce. I could only get the name in the mini-buffer to flicker after just starting the REPL (with LSP on). Otherwise the function argument hints work well with Cider and LSP together using practicalli/clojure-deps-edn config
I assume both LSP and a REPL session (Cider jack-in or connect) have been run. Does the issue happen with only LSP (no REPL - , m q q to kill the REPL)
Or try with just the REPL and shut down LSP with , b s (`lsp-workspace-shutdown`)#2022-05-0109:10practicalli-johnnyTry updating the LSP server SPC SPC lsp-update-server and then restart LSP , b r (`lsp-workspace-restart`) as there are lots of regular improvements.
Check there isnt an older installed version of clojure-lsp on the operating system execution path (i.e. from a manually installed clojure-lsp binary outside of emacs)#2022-05-0114:26Drew VerleeMaybe i have to versions of clojure lsp. I have been using
update-lsp: aliased to sudo bash < <(curl -s https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/master/install)
to update clojure lsp.#2022-05-0114:26Drew Verlee/cdn-cgi/l/email-protection ī° ~/.spacemacs.d ī° ī live ī° clojure-lsp --version
clojure-lsp 2022.04.18-00.59.32
clj-kondo 2022.04.09-SNAPSHOT#2022-05-0200:23Drew Verlee@U05254DQM wanted to follow up and say thanks. I think your right, my version of lsp might have been old? I reinstalled like you said and it fixed itself. It's possible your config looks for lsp different then i was doing in the past. Unclear, but it seems better now.#2022-05-0110:30Ho0manHi, is there a way to instructr spacecmacs to search all the sub projects when we use Leiningen's checkout feature ?
Thanks in advance#2022-05-0110:36practicalli-johnnyIf all the checked out projects are under a common directory, e.g /projects/ the add a .projectile file to /projects root and start a search
A .projectile file can also include patterns to control what files are included (similar to gitignore)#2022-05-0110:37Ho0manThanks again, John#2022-05-0114:27Drew Verleepressing spc q r (restart emacs with layouts) tells me that its getting "the wrong number of arguments" is that happening for anyone else?#2022-05-1607:16practicalli-johnnyEmacs 29 has just introduced its own implementation of restart-emacs function.
Spacemacs uses a package that includes restart-emacs
Unfortunately the emacs29 function takes no arguments (and at present has less functionality)#2022-05-0114:27Drew Verleei guess ill just have to not restart for a while. just plain stop and then start like some barbarian.#2022-05-0220:25murtaza52LSP :: Connected to [clojure-lsp:28775/starting].
LSP :: clojure-lsp has exited (bus error (core dumped))
Server clojure-lsp:28775/starting exited with status signal(check corresponding stderr buffer for details). Do you want to restart it? (y or n) n
how do I resolve the above message ?#2022-05-0220:35practicalli-johnnySeems like clojure-lsp is crashing. My first guess would be an old install of clojure-lsp on the operating system execution PATH
On a Unix system which clojure-lsp in a terminal should help you find it
I typically let Emacs download the LSP server, there is also an update command.#2022-05-0221:35ericdalloIn case you want to install via any other way: https://clojure-lsp.io/installation/#2022-05-0220:29murtaza52Its a new installation of emacs and spacemacs (using he excellent practicalli config from @jr0cket)#2022-05-0514:40Ho0manHi everyone,
My Spacemacs keeps freezing for 6-7~ seconds while typing.
I'm using practicalli's dot.spacemacs with some modifications (clj-kondo instead of lsp, relative line numbers and aggressive indenting for clj)
Emacs 27.2
Spacemac's on the latest commit from develop
Any help is appreciated
Thanks a lot#2022-05-0515:48practicalli-johnnyIf LSP had been running, I would have suggested a conflict between LSP formatting and aggressive-indent.
I would start by disabling aggressive-indent and see if it makes a difference#2022-05-0517:43ericdalloyou can M-x toggle-debug-on-quit and when emacs freeze type C-g , it should stop and tell where it was frozen so you can debug it better#2022-05-0605:49Ho0manThanks @U05254DQM
Yeah Iāve tried that but still got freezes#2022-05-0605:50Ho0manThanks @UKFSJSM38 Iāll try that#2022-05-0606:51practicalli-johnnySPC SPC toggle-debug-on-quit and using C-g (may have to press several times) to get a back trace is very useful to identify the functions called leading up to a freeze (the newest calls at the top)
The weirdest issue I had like this was with the compositor library, lagging behind the redrawing of the Emacs window. So changes happened, but I didn't see the results for a few seconds, making it look like a freeze.
I would also try using Emacs without a Spacemacs config, either move .spacemacs.d or start Emacs with the -Q option, emacs -Q#2022-05-0614:50Ho0manThanks practicalli will try that (but right now somehow I cannot reproduce the problem)#2022-05-0618:20allentiakHi,
Could you please help me to setup Spacemacs for debugging ClojureScript code directly from within Spacemacs?
(I know CIDER does not support ClojureScrpit.)
I found some instructions for using LSP. I tried it, with no avail... (details in thread)
Of course, other options are most welcome :-)
Thanks in advance,
--Leandro#2022-05-0619:27allentiakI know it's also possible to debug a ClojureScript project with the Developer Tools of most browsers (Firefox, Chromium...).
However, I would like to be able to do that directly from Spacemacs itself.
Would you know of such a way? I have only found one, and cannot make it work...
Whereas I found a link[1] where they show how to use dap-mode to debug ClojureScrip under vanilla Emacs, I haven't been able to adapt these instructions to work under Spacemacs...
[1]: https://emacs-lsp.github.io/lsp-mode/tutorials/debugging-clojure-script/
This is my current setup [2].
[2]: https://github.com/allentiak/.spacemacs.d
This is what I have done so far, following the instructions from[1][:
1) Create a launch.json in the project root [DONE]
2) Install Google Chrome Debug Adapter via M-x dap-chrome-setup [FAILS]
I cannot install the adapter. It seems the command is obsolete[3].
[3]: https://github.com/microsoft/vscode-chrome-debug#rotating_light-important
I get the following error:
"helm-M-x-execute-command: Have you loaded the āchromeā specific dap package?"
How should I load that package?
In a reply to my original Zulip message [4], @U05254DQM mentioned a bug w.r.t. the package download [4].
https://github.com/emacs-lsp/dap-mode/issues/554
That being said, the command M-x dap-chrome-setup, as mentioned in [1], seems not to exist...
[4]: https://clojurians.zulipchat.com/#narrow/stream/151763-beginners/topic/spacemacs.20.2B.20clojurescript.20.2B.20debugging.20.3F/near/281212390
Thank you in advance,
Leandro#2022-05-0620:06Drew VerleeFwiw. Nothing has ever worked for me in terms of a debugger w/ step, inspect, etc...
I just def vars. You can set break points on the js in the browser. But i rarely do.#2022-05-0621:09allentiakoh...#2022-05-0623:32allentiakthanks for the reply#2022-05-0623:33allentiakdoes everybody do that? I thought there were more sophisticated ways to debug ClojureScript...#2022-05-0623:47Drew VerleeWell, in a way, you can debug clojure with clojure using the repl. So it's not really lacking, just different. The downside is you can't step though code as easily. I'll say that i think that's a weakness, but most fe frameworks would probably make it impossible regardless...#2022-05-0701:10practicalli-johnnyI haven't tried a step debug tool for ClojureScript as I rarely write complex algorithms in the front end.
Even with Clojure, the Cider debug tool is not the first thing I reach for.
Usually the result of calling a function in the REPL gives me an idea what's wrong. I use the Cider inspector if it's a large or nested data structure (or clojure.pprint)
If the cause is not obvious from calling the function I'll break down that function and evaluate just the parts of it (using some mock values)
If the ClojureScript code it is platform neutral (no JavaScript interoperability) I can always write that code in a .cljc file and use the Cider debug tool and a Clojure REPL.
And then there is always println or the more sophisticated tap> approach (with a tool like portal).#2022-05-0713:53practicalli-johnnyI'm moving all my configs to usehttps://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html`XDG_CONFIG_HOME`https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.htmlon Linux at its more consistent and much easier to backup. Emacshttps://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html`XDG_CONFIG_HOME`https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html for several years now, so I've moved Emacs and Spacemacs configurations and everything seems to work so far... although I'll have more certainty after running for a few days.
Emacs is straight forward.
⢠Set XDG_CONFIG_HOME (typically $HOME/.config) and move ~/.emacs.d directory to $XDG_CONFIG_HOME/emacs
Spacemas is also straight forward.
⢠Set SPACEMACSDIR to $XDG_CONFIG_HOME/spacemacs
If starting Emacs from a desktop launcher, the XDG_CONFIG_HOME should be set in your .profile (or sourced by that file). Otherwise add XDG_CONFIG_HOME to a resource file (e.g. .bashrc for bash, or .zshrc or .zshenv for zsh)
There is a https://github.com/syl20bnr/spacemacs/issues/3589#issuecomment-1120211297#2022-05-1010:38practicalli-johnnyPR on Spacemacs to add key bindings to work with topics, making it easier to remember how to create, update, assign GitHub/GitLab issues and pull requests from within the comfort of Emacs
Comments in the PR welcome, especially the choice of key bindings. Thank you.
https://github.com/syl20bnr/spacemacs/pull/15506#2022-05-1219:21practicalli-johnnyPull Request has been merged.#2022-05-1212:28practicalli-johnnyI've greatly simplified the LSP layer configuration I was using. Most visual elements are toned down or disabled by default, except for the slideline bar and documentation pop-ups.
The lsp layer configuration I am currently using disables the sideline bar and documentation pop-ups. The config also maximises the space in all treemacs views for LSP
(lsp :variables
lsp-ui-doc-enable nil ;; disable all doc popups
lsp-ui-sideline-enable nil ;; disable sideline bar for less distraction
treemacs-space-between-root-nodes nil ;; no spacing in treemacs views
)
#2022-05-1213:01ericdalloMy doom config is pretty similar to that :) after quite some time using lsp I realized I didn't need most lsp-ui features too#2022-05-1213:03practicalli-johnnyThank you for helping to simplify the defaults in LSP UI, its much appreciated.#2022-05-1716:25Martynas MI use this config:
(lsp :variables
;; useless popup
;;
lsp-ui-doc-enable nil
lsp-ui-sideline-enable t
;;lsp-ui-sideline-show-hover t
;;lsp-ui-sideline-show-diagnostics t
lsp-ui-sideline-show-code-actions t
;; the line is very tall, disable it
;;
lsp-headerline-breadcrumb-enable nil
)#2022-05-1213:02practicalli-johnnyThe LSP update and support for the http://FreeDesktop.org XDG basedir specification have been pushed to https://github.com/practicalli/spacemacs.d/ - my configuration for Spacemacs, now running in ~/.config/spacemacs directory
⢠simplified lsp layer (as in previous post)
⢠XDG basedir specification - custom files relative to dotspacemacs-directory so will work from ~/.config/spacemacs or ~/.spacemacs.d/ directories
⢠Customize variables section split into its own file, simplifying the versioning of the Spacemacs init.el file
⢠Treemacs history files saved to user-emacs .cache directory#2022-05-2102:332FOGood day, in org-mode how can I evaluate the source block under the pointer and not every source block in the buffer a la , b b#2022-05-2109:02practicalli-johnnyIs it , b e
SPC m b e org-babel-execute-maybe
Some of the org command names are a little cryptic
https://develop.spacemacs.org/layers/+emacs/org/README.html#babel--source-blocks#2022-05-2115:192FOThat's the one thanks. Great job on http://pratical.li btw that's where I learnt about source blocks in the first place.#2022-05-2615:51practicalli-johnnySpring time cherry picking using Magit
If you are used to using the rebase menu in Magit, its a similar approach (but with a different scope of course)
I've added a new page showing how to cherry pick one or more commits between two branches. You can also see the commits (cherries) that are available to pick between two branches too
https://practical.li/spacemacs/source-control/magit/cherry-picking.html#2022-05-2722:32lgesslerkind of OT since this isn't about clojure specifically, but is anyone else noticing how packages change bindings quite a bit sometimes? org-agenda's bindings have changed substantially over the past 5 years, pretty annoying š#2022-05-2818:152FOGood day,
How can I disable these`reference`signatures that show up next to functions and def's?
e.g:
(defn my-func [arg1 arg2] (stuff arg1 arg2)) 2 references
#2022-05-2819:10practicalli-johnnySPC m T l l or , T l l to toggle lsp-lens-mode, which shows references and number of unit tests#2022-05-2819:12practicalli-johnnyOr add lsp-lens-enable nil as a variable to the lsp layer in your Spacemacs configuration#2022-05-2819:13practicalli-johnnyFor example:
(lsp :variables
lsp-ui-doc-enable nil ;; disable all doc popups
lsp-ui-sideline-enable nil ;; disable sideline bar for less distraction
treemacs-space-between-root-nodes nil ;; no spacing in treemacs views
lsp-lens-enable nil
)
This will switch the lens off by default#2022-06-0119:33bmaddyWhen I paste a string deep in a form in spacemacs, the entire top-level form gets autoformatted. Does anyone know how I would figure out what is doing that? It still happens when lsp-mode and cider-mode are turned off.#2022-06-0120:07bmaddyWell, this is silly, but I solved it by switching to text-mode. š¤Ŗ#2022-06-0201:03practicalli-johnnyDo you have aggressive-indent enabled for clojure-mode#2022-06-0217:15bmaddyNope, global-aggressive-indent-mode is nil. š¤·#2022-06-0217:15bmaddyThanks for the thought though.#2022-06-2819:07bmaddyFor anyone looking at this later, I finally figured out a solution:
set lsp-enable-indentation to nil.
My configuration layer now looks like this:
(lsp :variables
lsp-ui-doc-show-with-mouse nil
lsp-ui-doc-show-with-cursor t
lsp-enable-indentation nil)
š#2022-06-1812:21practicalli-johnnyThanks to Termux I am now running Spacemacs from my Android smart phone, driven by an Atreus keyboard from http://Keyboard.io (any keyboard can be used of course, but the atreus is very portable)#2022-06-1812:24practicalli-johnnyI will write up how to use Spacemacs/ Emacs on Termux, but it's pretty straightforward (so long as you use the FDroid application to install Termux - don't use Termux from the Android store)#2022-06-1812:29practicalli-johnnyI have just installed Spacemacs on Termux, but haven't found any issues. I've been using Termux for a few weeks with Neovim (https://practical.li/neovim/termux/) and it it's quite responsive (the phone is a Google Pixel 2XL from around 2018).
FDroid is just an install from the Play store and doesn't interfere with the rest of the Android OS.#2022-06-2712:54Martynas MHey. How do I prevent values from REPL appearing in my echo area (the one at the bottom)? It doesn't give me much use and it also lags the UI as I have fat structs in REPL. And then everything jumps around without much point because when I move my cursor again the echo area clears up and then reappears in one second.
The only thing I want is that nothing would jump as I investigate the data structure by moving with my text cursor.
Reproduction:
1. Print this into REPL:
(println (->> (range 1000)
(map (juxt identity (constantly {:key :item})))
(into {})))
2. Go to REPL buffer and move your cursor onto the map's key or on the starting/ending paren of the data structure.
3. Result in the snapshot:#2022-06-2713:38practicalli-johnnyConsider using the Cider inspector for results of more than a few lines
https://practical.li/spacemacs/evaluating-clojure/inspect.html#2022-06-2713:43Martynas MWow, that's actually pretty good and I'll probably use it. But I only wanted to scroll through the lines in REPL and it was constantly jumping. It shouldn't be jumping randomly.#2022-06-2713:48practicalli-johnnyI don't use the REPL buffer, it's very limited. To avoid scrolling issues for large results then switch that buffer to fundamental mode (making it even more redundant)
My advice is to evaluate code in source code buffers and use the inspector for larger results. keep the inspector open if you need to follow results as each expression is evaluated.
Close the REPL buffer and try forget it's there..#2022-06-2713:50Martynas MAlright.
For me the inspector buffer doesn't have my evil-mode keybinds. Any suggestions on that? It says that the buffer is read-only but I'm not going to edit, I'm only going to move around.
Edit: I miss my 5j and }} to move by paragraphs and G to go to the bottom.
Edit2: I remember when I was opening the REPL to evaluate code into it and was constantly changing its namespace into the current one. I didn't know how to evaluate code from the source buffer. Maybe this is the next step :thinking_face:
Edit3: Probably the read-only issue is with evil-mode itself
Edit4: There is a thing called evil-motion-mode for read-only buffers. But it doesn't have <RET> and L bindings.#2022-06-2716:42practicalli-johnny, e f evaluates the current top-level form
, e e evaluated the previous form (s-exp)
, e is the evaluation menu and gives lots of options, more that most people need
When evaluating in a source buffer it uses the namespace of the source buffer, so you dont need to change anything, just evaluate#2022-06-2716:49practicalli-johnnyEvil key bindings seem to work in the inspector buffer for me, G gg, j , k, n , p, etc. I havent noticed any problems.
There arent line numbers when its a data set from the example code you provided, so 5j will not work as this is a logical representation
If you want to navigate, try evaluate to pretty print, , e p f etc.#2022-06-2717:14Martynas MIt doesn't matter whether there are line numbers. I made my line numbers work on my treemacs buffer and they work. So I can then add this mode into the hooks of treemacs and they'll work too.
It's an incidental problem that emacs's special-mode prevents evil-mode motions and I can't enable evil-motion-state on that buffer by using a hook. I can enable the evil mode manually but then it disappears when I try to navigate.#2022-06-2807:54Martynas MI still like cider-result better. And I can copy the result to do something with it later :thinking_face:
I don't know why but cider-inspect seems to be overengineered and there is too much output. I don't care what classes there are. Maybe I'll care if I'll need to inspect a Java-based class but cider-result just works.
Also evil keys don't work in cider-inspect whereas they work very well in cider-result.#2022-06-2806:16Martynas MIs there a way to run my own code snippet for the current namespace?
I want to take the namespace (could be the namespace name or the source itself) and then send it to my own function that I could define in the .spacemacs. I want to do this because I want to use remove-ns and maybe some other functions.#2022-06-2806:56Martynas MThis worked but it could probable be done in a better way:
(defun mm-cider-remove-ns ()
(interactive)
(cider-interactive-eval "(remove-ns (symbol (str *ns*)))"))
(spacemacs/set-leader-keys "-nr" 'mm-cider-remove-ns)#2022-07-0406:39Martynas MIs there a good way to speed up the loading of the layout? I have a lot of files open and when I restart the editor then I have to wait until it loads all of them. Is there a way to load the layout without loading the buffers?#2022-07-1002:47stagmooseanyone know how to change the background color of popup window of autocompletion?
I searched for ac-xxx font suggested by https://emacs.stackexchange.com/questions/55224/how-could-i-change-the-font-color-on-the-popped-out-window-jedi but cannot find anything start with 'ac'
besides, how can I disable the yellow popup doc? Is this tooltip?#2022-07-1003:49Jon BooneAre you using the Customize menu option?#2022-07-1008:55stagmooseyes I use customize face in M-x#2022-07-1011:32Jon BooneAh, I see ā and no faces starting with ac show up?#2022-07-1011:40stagmooseyeah, there's no faces start with "ac"#2022-07-1011:41stagmoosethe original theme i was using is hc-zenburn, I change to doom-zenburn, now the selection background of ac pop is more visible#2022-07-1011:41stagmooseso kind of fine now.#2022-07-1110:17Martynas MHey.
Does anyone have any success of using editorconfig for clojure with Spacemacs? I think it doesn't pick up the config :thinking_face:
It works for HTML and other things but I think it doesn't work for Clojure.
I tried to look into github issues of CIDER and clojure-mode but there are no discussions about this.
Should I open an issue in any of those or is it my local set up problem?
Does anyone have it working? I want to be able to switch editor into nvim but first I want to make .editorconfig that would make the formatting consistent.#2022-07-1113:04Martynas MI found that spacemacs should be the "source of truth" for clojure formatting.
But that doesn't make it easy because when I open things in nvim then this is my formatting:
(Thread/setDefaultUncaughtExceptionHandler
(reify Thread$UncaughtExceptionHandler
And in Spacemacs it's
(Thread/setDefaultUncaughtExceptionHandler
(reify Thread$UncaughtExceptionHandler
So that single space means it's inconsistent.
I don't know what to do.#2022-07-1310:44otfromIs there a list of all the spacemacs keybindings some place or a way of seeing what they are for different modes? I'm setting up some keybindings and I'd like to be able to follow along with spacemacs practices if possible#2022-07-1310:47Martynas Mtry pressing M+x and enter describe-mode#2022-07-1310:52otfromI was hoping it was documented somewhere beyond describe-mode as I don't have spacemacs installed#2022-07-1311:01Martynas MFrom what I know when using CIDER they define very many different keys for different sub-modes and those modes are all different.#2022-07-1416:13otfromFound it for spacemacs: https://develop.spacemacs.org/doc/DOCUMENTATION.html#commands#2022-07-1416:13otfromthere are bindings for each layer as well#2022-07-1416:13otfromjust want to keep my "emacs from scratch" as the kids say nowadays consistent#2022-07-1319:02Drew Verleehow would i hide lines surrounding a region? i feel like i saw this feature in spacemacs default and i can't find it now.#2022-07-1319:04Drew Verleethe answer is narrow-to-<blah>#2022-07-1319:07Drew Verleethat's intresting, i narrowed file-a in one buffer then i created a new layout, and opened the file-a in another buffer and it's narrowed in that one to.#2022-07-1420:52Drew Verleewhen i search with "/" when i'm looking through the list of results, it will try to preview the fil, which is great. What's not great, is when it reaches a "big file" it will warn me and give an option to open it, abort or open in literlly (without formatting) which again is fine, but it gets stuck. like no matter what i press it just asks me again and again.#2022-07-1509:55Martynas MIs there a way to do an autosave without prompting the user when I evaluate the buffer?
I don't want to press y all the time. I think I always press y.#2022-07-1509:58Martynas MNevermind, found it:
https://github.com/clojure-emacs/cider/commit/676a80869d769cc45e49f498bfe3a1b5a94f5427#diff-4929d71e369ef762328425005fac462b351528f77c84d5408ae52066d91751a3R114#2022-07-2003:59Drew Verleeemacs will open firefox, which i want, but it doesn't seem to be the same one that i open from my desktop. e.g i'm not logged in, no extensions, etc... any idea how i configure this? I see there is a "search" package, but that seems like overkill.#2022-07-2004:00Drew Verleei must have two versions of firefox installed. lovely.#2022-07-2004:37Drew VerleeI used the search layer and set it to chrome. Better then what i had.#2022-07-2609:27Martynas MIt's also possible that you have your own firefox profile. I use profiles on chrome to have completely different "user sessions" but only one system installation.#2022-07-2015:02Drew VerleeHow would i go about integrating https://www.emacswiki.org/emacs/CfnLint with spacemacs? I droped those expressions (e.g (defin-dervied-mode cfn-yaml... ) in my dotfile's dotspacemacs/user-config and restarted and i didn't get any linting in my yaml file that had the text AWSTemplateFormatVersion: "2010-09-09" at the top. So it doesn't seem to be working as i would expect.#2022-07-2018:14Cora (she/her)could you use this? https://github.com/emacsmirror/cfn-mode#2022-07-2018:17Cora (she/her)otherwise it looks like this spacemacs config from a while back sets up cfn-mode using the method you linked to https://gist.github.com/bleggett/89d288e370284ec083d7eb324253a4ef#2022-07-2018:18Cora (she/her)personally I prefer using packages that already have that set up#2022-07-2018:21Cora (she/her)it looks like this supports quite a bit https://github.com/emacsmirror/cfn-mode/blob/master/cfn-mode/cfn-mode.el#2022-07-2102:19Drew VerleeThanks cora. Do you understand the configuration in cfn-mode? it just says this (flycheck-cfn-setup) . I think the author assumes i know something i don't.#2022-07-2102:21Cora (she/her)I think you'd need to (require 'flycheck-cfn) and then run that#2022-07-2102:22Cora (she/her)i don't remember how spacemacs does custom packages, and how it handles running code after the package loads, but that's where to look#2022-07-2102:23Drew Verleegotcha. thanks again.#2022-07-2102:23Cora (she/her)https://github.com/emacsmirror/cfn-mode/blob/master/flycheck-cfn/flycheck-cfn.el#L107#2022-07-2102:24Cora (she/her)maybe you just need to run that function and auto loads handles the rest?#2022-07-3002:34Drew VerleeThe default spacemacs theme feels like home.#2022-07-3113:33Lars Kristian Maron TelleIs anybody having problems with Helm recently? After pulling the latest commits from develop, and updating packages, it seems like I can't use Helm at all. I get the following message in the minibuffer when trying for example SPC SPC: Symbol's value as variable is void: minibuffer-follows-selected-frame. š¢#2022-08-0111:09Lars Kristian Maron TelleIt works again now after pulling and updating packages. š#2022-08-0406:39jumarDoes spacemacs have an equivalent action (and keybinding) for projectile-find-file-in-directory?#2022-08-0407:55erwinrooijakkersIf you use SPC-? you can search for keybindings#2022-08-0407:58erwinrooijakkers#2022-08-0407:58erwinrooijakkersSo apparently itās SPC p d#2022-08-0407:59jumarThat's not the same thing - I'm looking for projectile-find-file-in-directory#2022-08-0407:59jumarprojectile-find-dir simply jumps to the directory#2022-08-0408:00erwinrooijakkersAh okay then it doesnāt exist. You can create a binding yourself, like this in dotspacemacs/user-config of .spacemacs:
(define-key evil-normal-state-map (kbd "<SPC>ps") 'projectile-find-file-in-directory)#2022-08-0408:00erwinrooijakkerss search is still freeā¦#2022-08-0408:03jumarThanks for the tip!
I just did this - except that I used SPC o p s to avoid future collisions (I think SPC o ... prefix is meant to be used for user-defined bindings)#2022-08-0408:25erwinrooijakkersah haha i was not aware of user-defined bindings to avoid future collisions#2022-08-0408:25erwinrooijakkersmakes sense#2022-08-0407:52erwinrooijakkersSince updating to Emacs 29.0.50 the color of my cursor switches to purple instead of yellow#2022-08-0407:52erwinrooijakkersExpected:#2022-08-0407:52erwinrooijakkersActual:#2022-08-0407:53erwinrooijakkersItās not the lisp mode as far as I am aware since the behaviour is the same, only the cursor color is different, if I press ESC it switches back to yellow#2022-08-0407:55erwinrooijakkersany ideas how to keep it yellow ? š#2022-08-0519:43Drew VerleeIs the setting where helm opens results in the buffer causing anyone elses emacs to crash on larger files? (helm :variables helm-follow-mode-persistent t)#2022-08-0522:59Drew VerleeFml i would pay for emacs support right now just to make sure there is nothing messed up with my setup. Like my computer is cursed.#2022-08-0605:59Martynas MTry Spacemacs. It "just works" but you have to accept they way of doing things and all of the keybinds too.#2022-08-0606:35Drew VerleeI'm using spacemacs#2022-08-0606:36Drew VerleeIt was helm opening buffers on search and crashing#2022-08-0606:37Drew Verlee"My" Emacs is just too fragile for big projects. It also wont give me tab completion on functions.#2022-08-0607:09Martynas MWell... Currently I try to switch to nvim and I had to write a small plugin to meed my own needs.
It's mostly because I couldn't use evil-mode keybinds where I wanted to.
It may not apply to you.#2022-08-1017:38Ho0manHi everyone,
I'm using spacemacs with practicalli's default .spacemacs/ folder. I'm experiencing frequent freezes.
I've searched a bit and found that most probably the large savehist (over 100M and 200M) file inside .emacs.d is the culprit.
Removing the file brings spacemacs back to normal but some minutes after deleting it suddenly reappears and
jumps back to the same large size. Any help is appreciated.#2022-08-2519:25Christopher GsellHey everyone, I just installed a new instance of spacemacs on my new computer. Having trouble adding Source Code Pro as the default text. Any help would be much appreciated!#2022-08-2523:37zaneYou might want to share more information. simple_smile What steps, if any, have you already tried? What happened?#2022-08-2601:57Christopher GsellJust figured it out! Thank you!#2022-08-2702:30JeffRHi everyone, I'm using practicalli's spacemacs configuration. However, I found it couldn't auto complete the Java interop code. For example, I'm typing (System/cu), no completion is popping up. If I press tab, no matches is displayed. How do can I enable Java java interop auto completion in spacemacs?#2022-08-3119:56Jeongsoo LeeHmm. I'm also not getting autocompletes with clojure-lsp on the Java methods as well:#2022-09-0622:07Drew Verleeanyone know of a search buffer like helm-ag only where i can annotate around the search results/links.#2022-09-0622:08Drew Verleeoften times i have have to go through all items in a search and remember something about all of them... i guess i could add the notes directly to the files.#2022-09-0622:08Drew Verleethat might be the easier thing...#2022-09-0622:56zaneWhat a fun question.#2022-09-0622:57zaneYou could use Embark, via https://docs.doomemacs.org/latest/modules/completion/vertico/.#2022-09-0622:59zaneIn evil mode the key sequence would be:
⢠SPC / to initiate the search
⢠type your query
⢠C-; to invoke Embark
⢠E to invoke embark-export
That would give you a buffer with the search results. You could then write that to disk. Might need to manually invoke grep-mode when you open it again to make the links work.#2022-09-0701:47Cora (she/her)ivy-occur is pretty awesome and I think fits the problem you're describing #2022-09-0701:48Cora (she/her)apparently you can save the results of helm-ag using C-x C-s (according to reddit)#2022-09-0702:14Drew VerleeThanks @U050CT4HR and @U02N27RK69K I'll have to take a look at ivy-occur and embark. I have been using helm-ag as part of my spacemacs setup.
And i recently figured out how to save the search results.
But it would be cool to add some information to the list without losing the links.
Like i said, i guess i can just add it directly to the file and remove the notes before doing a git commit. I'll try just doing that for a bit and see if i need to look into some other way.#2022-09-0820:342FOHello,
Two parter:
1. How can I zoom an individual window and not the entire frame?
2. Is there a way to universally disable the title bar that appears in certain modes e.g clojure mode. i.e: https://files.slack.com/files-pri/T03RZGPFR-F042C5S2E64/image.png#2022-09-0913:29Jeongsoo LeeIncreasing font sizes is actually buffer-local, I conveniently use it Macs with command-= or command-- with osx layer declared. The function names themselves are spacemacs/scale-up-font and spacemacs/scale-down-font.#2022-09-0913:30Jeongsoo LeeThe title bar is actually called a breadcrumb. You can disable the feature: https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/ I recommend putting it inside the :config section of use-package .#2022-09-0917:382FOMuch appreciated, removing the breadcrumb is a big improvement. spacemacs/scale-up-font and spacemacs/scale-down-font scale all buffers in the frame for me.#2022-09-0918:19Jeongsoo Lee@U01HBARPCFL Hmm, if I open A.clj on the first window and B.clj on the second, then calling spacemacs/scale-up-font on the first window only increases the size of the characters in A.clj .#2022-09-0919:012FOGood to know, perhaps there's a variable I can set to get that behavior. I'll do some investigating#2022-09-1305:20jumarI have this in my spacemacs file but yet when I press , = = my HTML (and JS files) still get reformatted to use 4 spaces.
(setq js2-basic-offset 2)
(setq js-indent-level 2)
(setq css-indent-offset 2)
(setq web-mode-markup-indent-offset 2)
(setq web-mode-css-indent-offset 2)
(setq web-mode-code-indent-offset 2)
(setq web-mode-attr-indent-offset 2)
This works as expected when I'm just typing the code into the buffer and pressing enter.
I think this is because spacemacs uses html-beautify program to do the formatting which by default uses 4 spaces.
How can I make this consistent with my settings?#2022-09-1305:22jumarIf I do this it works but it is cumbersome:
(setq web-beautify-args '("-s 2" "-f" "-"))#2022-09-2211:42maleghastIs anyone else having problems with Spacemacs after updating packages today..?#2022-09-2211:43maleghastI cannot get the bloody thing to run - Emacs 28.1 and HEAD of develop in the Spacemacs repo#2022-09-2211:48maleghastIt does seem to be that for some reason the updater cannot find a large number of the packages, but on my personal machine there is no trouble at all... š#2022-09-2211:54maleghastscreenshot from --debug-init:#2022-09-2211:55maleghast(could not figure out how to copy and paste everything - sorry for the ugly / big screenshot)#2022-09-2917:37olliTrying out Spacemacs for the first time. I'm experiencing what looks like a bug or misconfiguration of some sort - when I press , it opens a menu with the available key bindings, but some of the descriptions seem to be missing and replaced with +prefix. Is there something I could do about it?
I'm running the latest develop and https://pastebin.com/WATaSWpm#2022-09-2917:39olliOh and if it matters I'm on Ubuntu 22.04 and Emacs 27.1#2022-09-2917:42olliGrepping around in the Spacemacs repository, it looks like the command descriptions are defined https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Blang/clojure/packages.el#L78 if I'm not terribly mistaken?#2022-09-2918:09weavejesterI get the same result.#2022-09-2919:51eggsyntaxI get a different set of prefix ones, eg s for me says prefix (but does contain the 'send to repl' commands). So yeah, seems like a bit of a bug.
If it helps, = is format, g is goto, h is documentation, r is refactoring (some of which doesn't work currently IIRC), and T is toggle,#2022-09-2919:53eggsyntax(I'm on develop, but not particularly up to date)#2022-09-3007:36olliAlright thanks! I'm jumping on Spacemacs without any meaningful experience with Emacs, so it's good to know it's looking more like a bug than me having already messed up my setup š
#2022-10-0815:26olliI got the descriptions working while resolving another issue I was having. I couldn't get emacs to boot LSP with my project and when calling some of the lsp commands manually I either got a blank buffer or an error message about treemacs-treelib that I initally brushed off as unrelated but it kept reappearing when executing a particular command, so I started googling around for a clue and ran into this https://github.com/doomemacs/doomemacs/pull/6812. Removed everything treemacs-related under my .emacs.d as suggested and rebooted into a working setup
Reading further into the clojure layer source, it seems that the missing descriptions have a common link as they https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Blang/clojure/packages.el#L95 and https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Blang/clojure/packages.el#L104 so I guess it was just cross-talk between the involved plugins š¤·#2022-10-1523:40Brian BeckmanI'm not sure it's a bug. Perhaps =, g, h, r, T are prefixes that don't have names? If you press those keys, do you get meaningful, second-tier menus?#2022-11-1310:23practicalli-johnnyPrefix is an un-named sub-menu, so its not a bug unless that sub-menu is named in the respective Spacemacs layer configuration - menus are typically defined in the packages.el file in the layer configuration.
Ideally sub-menu's should all have meaningful names and they do so in the Clojure layer (or there is a bug in .Spacemacs (or .spacemacs.d/init.el config).
In the original posting, the .spacemacs file has the Clojure layer added twice, which may cause problems.#2022-11-1414:38olliOh, thanks for pointing it out! I seem to have removed the duplicate at some point but can't remember doing that on purpose, maybe it was the problem all along, at least it would seem like an obvious source for the "cross-talk" I was experiencing
Also would like to thank you @U05254DQM for the helpful tutorials on Spacemacs. They definitely helped me to commit to learning the editor, coming from a Vim background#2022-09-2921:05Drew Verleecross posting a small question from #emcas bc it might be spacmacs specific. how would you yank and then replace a keyword? I can yank a keyword with space k y (sp-copy-sexp) and there is a evil-insert before and after but not "replace" option.#2022-10-0319:25zaneOne way to do the replacement would be to use visual mode. I use Doom instead of Spacemacs, so the keys might be a bit different, but the idea would be to use vi with a text object that will select the keyword (perhaps evil-inner-symbol or one for s-expressions if you have one).#2022-10-0319:25zaneThen once youāve got the symbol selected you can use evil-paste-after.#2022-10-0319:34zaneAh, but you want to yank it first.#2022-10-0319:35zaneIn that case youād want something like cio which will delete (and yank) the symbol and put you in insert mode. You can then use C-r to either paste from a previous register or type something out in insert mode.#2022-11-0400:012FOHowdy all,
I'm struggling to set-up a working browser repl with shadow-cljs. My app has a nrepl connection on port 3333.
Here's my workflow:
1. Open nrepl prompt , '
2. Select cider-connect-cljs
3. Select localhost
4. Select my-app:3333
5. Select shadowfrom the nrepl list
The *Messages* buffer states [nREPL] Direct connection to localhost:3333 established.
However, evaluating the core.cljs buffer hangs indefinitely on Loading /my-app/src/app/core.cljs... and evaluating a function e.g (js/alert "hello") has no effect in the browser.#2022-11-0400:38Drew VerleeIs your project public? I can diagnose it faster looking at it.#2022-11-0400:38Drew VerleeHow are you injecting the nrepl middleware/code/libraries/deps into your app so that cider can connect to it?#2022-11-0400:39Drew VerleeFinally, assuming you did that right (see https://shadow-cljs.github.io/docs/UsersGuide.html#cider)#2022-11-0400:40Drew VerleeI sometimes have to go to the shadow cljs browser tab that has the server info and force a compile, then browser app before it will let me eval something.#2022-11-0400:592FOThe repo's not yet public, I'm afraid.
RE: nrepl injection method, how would I go about determining that?
I'll go ahead an include the shadow-cljs.edn on the off chance that helps:#2022-11-0401:002FO{:builds
{:app {:asset-path "/js"
:modules {:main {:init-fn app.core/main}}
:output-dir "public/js"
:target :browser}
:cards {:asset-path "/js"
:modules {:main {:init-fn app.cards/main}}
:compiler-options {:devcards true}
:output-dir "public/js"
:target :browser}
:test {:ns-regexp "app.cards"
:output-to "out/test.js"
:target :node-test}
:e2e {:ns-regexp "e2e.*"
:output-to "out/e2e.js"
:target :node-test}}
:dependencies [[reagent "0.8.1"]
[devcards "0.2.6"]]
:dev-http {4200 "public"}
:nrepl {:port 3333}
:source-paths ["src"]}
#2022-11-0401:27Drew VerleeCheck the links above as well as reading the cider docs about shadow, that's a good starting point for understanding.
But when you start shadow it needs a cider client lib.
Cider Jack in, will add it for you. If you connect, then you have to add it.
No way is better, but if emacs/cider adds it for you then the client lib will sync with the server.#2022-11-0401:362FOI'll do some digging, thanks for the tips#2022-11-0401:50Drew VerleeYeah. After reading that once, feel free to ask again. It's not easy.#2022-11-2011:41jumarI noticed a while ago, that after I (re-)start Spacemacs and I then load perspectives from a file (that I saved before quitting Emacs)
it takes a long time (many seconds, even minutes) until it's able to load properly.
Has anybody experienced the same problem?
The messages I see in the status buffer are mostly like this:#2022-11-2012:42practicalli-johnnyHavent seen that issue, but I do get undo-tree notices when I've moved/renamed files. Although I havent noticed a slow-down during starup.
Error reading undo-tree history from "/home/practicalli/.config/emacs/.cache/undo-tree-history/.!home!practicalli!projects!practicalli!blog!content!md!posts!clojure-cli-and-jvm-options.md.~undo-tree~"
You could try removing the undo-tree-history from the Spacemacs cache#2022-11-2012:43practicalli-johnnyEmacs 28 provides undo-redo which I am going to try as its reported as faster, especially for Evil editing (not that I find it that slow)
https://github.com/syl20bnr/spacemacs/issues/14406#issuecomment-851597233#2022-11-2212:46Jacquesdoes anyone maybe know the command combination to delete all white space between 2 words, including new lines (if this exists)? i tried to search for it but couldn't find anything#2022-11-2213:50tomdIf using evil mode, diw when in the whitespace will do this, but not across newlines. Looks like there's an error thrown when on an empty line actually, which I'll look to fix. In holy mode, fixup-whitespace (M-SPC) gets you close, but leaves one space, and also doesn't cross newlines.#2022-11-2214:32Jacquesah great. thank you. that will do the trick š#2022-12-0213:19Ben SlessAnyone have an idea why my spacemacs stopped popping to results buffers? Did something with window.el change, perhaps?#2022-12-0213:32practicalli-johnnyDo you mean like Cider test report buffer?
Or is this some sort of evaluation related buffer
Assuming a package update and Spacemacs update (pull) before this issue occured
Nothing jumps out at me from the Spacemacs commit history that seems related, could be a change in a package itself#2022-12-0215:48Ben Slessfor example, cider eval pprint last sexp opens the *cider-result* buffer but it doesn't pop into view#2022-12-0217:44practicalli-johnnyI've updated Spacemacs itself (without updating packages) and the eval pprint functions open in a *cider-result* buffer.
I'll try update the 103 packages next :))#2022-12-0218:23practicalli-johnnyI still get a *cider-result* buffer after updating to all the latest packages, pulling the latest Spacemacs code and updating Spacemacs configuration from template. I didnt see a config variable that could be set to change this behaviour. If its not fixed by an Emacs restart or Spacemacs update, then maybe #C0617A8PQ has ideas#2022-12-0219:17Ben SlessI recompiled Emacs and it behaves, now#2022-12-0416:17Drew Verleemy setup always goes to the cider error buffer even though i told it not to.#2022-12-1207:33robstat7Visual char mode (v) is not highlighting characters being selected. It is working but I have to manually recognize the number of characters being selected in the line with l. Is there a fix for this bug?#2022-12-1208:47tomdCan you leave a bug report on the https://github.com/emacs-evil/evil/issues, preferably with repro steps from a minimal config?#2022-12-1209:52practicalli-johnnyNever seen this kind of issue before.
Did you recently upgrade packages?
Have you tried using a different theme SPC T s
If running Emacs in a terminal, try as a GUI app and see if the issue remains?#2022-12-1211:29robstat7@U05254DQM This is the issue with tango theme.#2022-12-1209:52practicalli-johnnyNever seen this kind of issue before.
Did you recently upgrade packages?
Have you tried using a different theme SPC T s
If running Emacs in a terminal, try as a GUI app and see if the issue remains?#2022-12-1710:51practicalli-johnnyI was renewing my GitHub developer tokens so I could use Magit Forge to access issues and pull request when I discovered that the new https://docs.github.com/en/graphql/guides/forming-calls-with-graphql (graphql api for issues and prs, etc).
So for now the 'classic' developer tokens are still required. I assume that fine-grained tokens will be supported eventually and I'll update the https://practical.li/spacemacs/source-control/forge-configuration.html when the are.#2022-12-1919:33Drew VerleeI would like it to be more obvious whats going on in my magit ediff resolves.
If you (what ever kind soul wants to help me) look at the picture, the mini buffer looks like it wants to tell me the branch info, but it runs out of room.
I get a lot of extra info like "clojure" and the file repated 3 times and UPPER and LOWER all which are just noise to me.
I'm i missing something, doesn't that just look cluttered and unhelpful?#2022-12-1920:32practicalli-johnnyI'm not sure I fully understand which issues you wish to solve, as the images only compare the mode line with the full screen of the other editors. It seems like there are two potential issue:
1. Modeline has too much information
2. You want more feedback during the diff (no screenshot of what you are doing in Emacs here)#2022-12-1920:34Drew VerleeIm currently under the impression that mode line, isnt showing the most useful information.
But maybe i don't understand what I'm seeing#2022-12-1920:36practicalli-johnnyIn the practicalli/spacemacs.d config I have switched off much of the information on the modeline by adding spacemacs-modeline as a layer and adding variables to customise the modeline
;; Configuration:
(spacemacs-modeline :variables
doom-modeline-height 12
doom-modeline-major-mode-color-icon t
doom-modeline-buffer-file-name-style 'relative-to-project
doom-modeline-display-default-persp-name t
doom-modeline-minor-modes nil
doom-modeline-modal-icon nil)
#2022-12-1920:38practicalli-johnnyAnd am using the Doom modeline theme (which these variables act upon, which I found easier to decultter than the spaceline theme
dotspacemacs-mode-line-theme '(doom)
#2022-12-1920:39practicalli-johnnyHowever, I dont really look at the modeline when using diff or ediff in Emacs, so not sure how this really helps issue 2.#2022-12-1920:44practicalli-johnnyI assume that ediff is launched by pressing e key on the file that is causing a merge conflict.
This should open 3 windows, two large windows showing the committed file and the file to merge respectively.
The third window along the bottom is the control window and ? shows the key bindings to control ediff
In Evil state, j and k keys move the highlight between the conflicting changes.
a uses the change from window one to resolve the conflict, b uses the change from window 2 to resolve the conflict#2022-12-1920:45Drew VerleeHuh. Nothing obvious on my screen displays the necessary git branch info, it seems to be in the modline#2022-12-1920:45Drew VerleeBut truncated#2022-12-1920:47practicalli-johnnySo this issue is you do not know which window is which in ediff ?
I dont have anything with a merge conflict at the moment, so not easy for me to check...#2022-12-1920:49practicalli-johnnyNot sure if this helps or makes things more confusing, but if you add diff3 as the conflict style in your Git config (`~/.gitconfig`) then you get 4 large windows, which shows the parent and resulting window as well
[merge]
# Include common parent when merge conflicts arise
conflictstyle = diff3
I suspect this does not resolve the issue you have.#2022-12-1920:55Drew VerleeThe issue is that there are times when it's not obvious which window contains which branches changes. Here is an example here it does contain that information HEAD and a-branch.
In the other one, it looks like the long file name somehow pushed that info off.#2022-12-1920:56Drew Verleeor like, it has the file path where the branch name should be?#2022-12-1920:56Drew Verlee#2022-12-1920:57Drew Verlee^ that at least has the branch info displayed.
the one below doesnt
https://files.slack.com/files-pri/T03RZGPFR-F04FWD50L4S/image.png#2022-12-1920:58Drew VerleeI think i tried diff3 and didn't like it because it messed up magit-ediff because it inserted characters that it didn't expect so it didn't register it as a diff in need of resolution.#2022-12-1921:00Drew Verleethanks for the help john. Its enough to bounch the ideas off someone. Ill just put this in my todo list of minor improvements i need to make. Maybe ill give doom modeline another try. I felt like it was missing some things i was used to.#2022-12-1921:07practicalli-johnnyI'd suggest trying out the doom modeline theme again. It should just need the two pieces of code I pasted towards the start of this thread and then restart Emacs.
I havent noticed the issue myself, but will take some screenshots next time.
I also need to do some screenshots of using diff3 with ediff as it seems to work well for me. As I can see the parent it makes it more obvious as to the change. I think a fairly recent version of the Git client is required (it was working from May this year)#2022-12-1919:34Drew VerleeI don't feel like i'm a special butterfly here, i don't see how anyone would want that setup for when there are doing git merges.#2022-12-1919:34Drew Verleelike look at vscode#2022-12-1919:35Drew Verlee#2022-12-1919:35Drew Verlee"Local changes" and "Changes from server"#2022-12-1919:35Drew Verlee^ that might be intellij#2022-12-1919:37Drew VerleeThis is defiantly intellij#2022-12-1923:08Drew Verleeapologies for the noise, i'm having one of those days with spacemaces.
Sadly, i have had so many of them that i'm going to put a lot more energy into trying to get Doom to be my main work editor buddy. I had Spacemacs crash on me while trying to do some text search in my magit buffer and i tried the same thing in doom and there was no issue. I Have no doubt this a hole i have dug, but i have no idea how to climb out myself out of it so i'm trying something new.
Hopefully this experience report is somewhat useful to someone else?#2022-12-2105:35Cora (she/her)it was other issues but the number of problems I had with spacemacs is what drove me to doom, too#2022-12-2118:42zaneLikewise. If you need help porting over some of the Spacemacs features like SPC k we can definitely help you out over in #C01GE5PD249. š #2022-12-2702:53practicalli-johnnyhttps://practical.li/spacemacs/ has a new look and improvement in some of the content. There may be a few images and links broken, so let me know.#2022-12-2703:14eggsyntaxDo you find that you still recommend Spacemacs to people new to Emacs? Although I still use it myself, Iāve gradually gotten less willing to recommend it. It seems semi-abandoned by the original creator; you pretty much have to stay on the develop branch, where itās not uncommon for bugs to be introduced; key bindings often get changed out from under me when I updateā¦#2022-12-2703:15eggsyntaxI really love Spacemacs in a lot of ways, but I find myself reluctant to put energy behind it. Would be really curious to hear your take on it.#2022-12-2710:44practicalli-johnnyIn summary, I still recommend Spacemacs for people new to Emacs and will continue to do so. Having spent the last 5 days updating the book (with over 70 commits) then it's fair to say I still put energy into it.
There are many maintainers for the Spacemacs project who the original maintainer delegated to after several years of work. There are regular updates to the Spacemacs project, so it is well maintained.
There is only one branch, the develop branch, so there are no specific releases. Spacemacs is considered a defacto rolling release with a well maintained changeling.
Bugs are mostly introduce by changes to the Emacs packages used, rather than Spacemacs itself. Spacemacs uses Melpa so packages are generated from source code on a daily basis. However, I still find that most bugs are fixed quickly or changes added to Spacemacs to manage package that break their API.
Key bindings have rarely changed over the last 5 year and any changes are covered in the changlog. There is a well defined key bindings convention that the maintainers follow. I assume if a new layer is added, there could be some initial key bindings churn, but this should be minimized if the key bindings conventions are followed. There have been some minor corrections over the years where the convention wasn't sticky followed.
The project isn't perfect and isn't a fit for everyone. Some people want to do far more customisation and if that isn't following the Spacemacs conventions then there is doom Emacs or several other configurations.
If someone prefers the chorded key bindings of classic Emacs then I typically recommend Prelude.
So I considered Spacemacs is a well maintained project that has a huge amount of features that are easy to add with little or no technical knowledge of Emacs and very little time to configure. I don't see a reason not to recommend this project, especially along with the Practically Spacemacs book and Configuration.#2022-12-2710:49practicalli-johnnyI do try other tools and there are some nice features in Neovim along with the Practically Neovim config. Although there is a big whole in functionality around a Magit style git client.
I also try Doom Emacs occasionally and it may be the Clojure LSP UI support is a little more comprehensive with Doom than Spacemacs, but I always stumble on the usability of Doom due to the different choice of key bindings which slows me down. I will be trying Doom Emacs again today, specifically to compare the Clojure LSP experience with Spacemacs.#2022-12-2719:44eggsyntaxThanks! I appreciate getting that input from someone whoās actually been pouring some time into evaluating it (which I definitely havenāt). And itās good to hear that itās still getting a fair amount of love. Doom is the main other one I periodically consider, but I havenāt been willing to make the switch as yet.
> If someone prefers the chorded key bindings of classic Emacs then I typically recommend Prelude.
Ohhhhh no, Iām evil 4 lyfe š
> Key bindings have rarely changed over the last 5 year and any changes are covered in the changlog. There is a well defined key bindings convention that the maintainers follow.
eg there was a set of changes to the CIDER bindings a couple of years ago (at the point where , , was introduced as a binding for cider-jack-in). But yeah, my original statement of keybindings changing āoftenā was really too strong.
Your comment definitely updates me toward being happier with continuing on the spacemacs track; thank you!#2022-12-2723:28practicalli-johnnyThere is an interesting comparison of Doom and Spacemacs on the Doom documentation site which seems to summarise quite succinctly the differences
https://docs.doomemacs.org/latest/#/migrate/from-spacemacs
In my own experiences people tend to adopt Spacemacs as its relatively quick and simple to get going. Some people grow out of Spacemacs or want to do more hacking or do not use all the features Spacemacs provides and want something simper / minimal.
The advantage of Doom is that easier to configure in significantly different ways from the minimal base Doom config.
The challenge is Doom will require more understanding of elisp and packages to configure. So in this respect Doom takes the user closer to the original Emacs ethos that you build your own highly tailored config and form your own workflows. This gives great power, although with that comes greater maintenance responsibility and time (and harder to share a setup with others).#2022-12-2800:24eggsyntax> In my own experiences people tend to adopt Spacemacs as its relatively quick and simple to get going.
Thatās definitely my story; I was a lifelong vimmer before Spacemacs š#2022-12-2801:33practicalli-johnnyI am the opposite, Spacemacs has made me a 'vimmer' - at least in terms of loving multi-modal editing... I am afraid vimscript is not on my todo list, although configuring Neovim with Fennel (a lisp) got my interest.
Setting up Doom emacs feels closer to the several months I spent creating a configuration for Neovim (hopefully not as long as I probably wont need to hunt around for packages that I am not familiar with)#2022-12-2818:26eggsyntaxYeah, vimscriptās pretty terrible. In a lot of ways I see Spacemacs as a better vim than vim, and the fact that it uses emacs lisp instead of vimscript is a substantial part of that.#2023-01-0400:53FlavaDaveI have just updated spacemacs, packages, and my OS and when I open spacemacs it opens in a scratch buffer in insert mode and when I hit ESC it wont leave insert mode, preventing me from using any commands. Anyone got any good ideas about how to address this?#2023-01-0401:13eggsyntaxIn terms of being able to do stuff, do C-x to get to a menu. Or to go ahead & get back into normal mode, you can do M-x and type evil-force-normal-state (shouldn't have to type too much to find the right one).
After that I'd go look at the *messages* buffer -- my guess is that something's broken in config and so it's not loading your config properly, and there should be a message about that in *messages*.#2023-01-0401:31FlavaDavehmmm C-x isn't doing anything and M-x evil-force-normal-state returns no-match#2023-01-0401:32FlavaDavethis is *messages*
Loading /Users/david/.spacemacs.d/init.el (source)...done
Loading /Users/david/.spacemacs.d/emacs-custom-settings.el (source)...done
(Spacemacs) Warning: Cannot find any of the specified fonts (Fira Code)! Font settings may not be correct.
Spacemacs is ready.
#2023-01-0401:37eggsyntaxHuh, ok, gotcha. Thaaaat sounds pretty messed up. How long had it been since you updated spacemacs? If itās at the point where C-x isnāt working, Iād personally start thinking about making a backup of ~/.emacs.d and then doing a fresh clone of spacemacs.#2023-01-0401:38FlavaDavea week#2023-01-0401:38eggsyntaxBut maybe someone will have another suggestion? š¤·#2023-01-0401:38eggsyntax> a week
Very weird.#2023-01-0401:40FlavaDaveYea I reinstalled spacemacs and it still is busted#2023-01-0401:40FlavaDave$emacs --version
GNU Emacs 28.1
Copyright (C) 2022 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
#2023-01-0401:40eggsyntaxYikes.#2023-01-0401:41eggsyntaxWhen you say you reinstalled, you totally deleted or renamed ~/.emacs.d?#2023-01-0401:41FlavaDaveemacs --debug-init
Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "/Users/david/.spacemacs.d/emacs-custom-se...")
load("/Users/david/.spacemacs.d/emacs-custom-se...")
dotspacemacs/user-init()
(condition-case err (dotspacemacs/user-init) ((debug error) (configuration-layer//increment-error-count) (spacemacs-buffer/append (format "Error in %s: %s\n" '"dotspacemacs/user-init" (error-message-string err)) t)))
(progn (condition-case err (dotspacemacs/user-init) ((debug error) (configuration-layer//increment-error-count) (spacemacs-buffer/append (format "Error in %s: %s\n" '"dotspacemacs/user-init" (error-message-string err)) t))))
(if (fboundp 'dotspacemacs/user-init) (progn (condition-case err (dotspacemacs/user-init) ((debug error) (configuration-layer//increment-error-count) (spacemacs-buffer/append (format "Error in %s: %s\n" '"dotspacemacs/user-init" (error-message-string err)) t)))))
(progn (if "Calling dotfile user init..." (progn (spacemacs-buffer/message "Calling dotfile user init..."))) (if (fboundp 'dotspacemacs/user-init) (progn (condition-case err (dotspacemacs/user-init) ((debug error) (configuration-layer//increment-error-count) (spacemacs-buffer/append (format "Error in %s: %s\n" '"dotspacemacs/user-init" (error-message-string err)) t))))))
(if (eq 'dumping spacemacs-dump-mode) nil (progn (if "Calling dotfile user init..." (progn (spacemacs-buffer/message "Calling dotfile user init..."))) (if (fboundp 'dotspacemacs/user-init) (progn (condition-case err (dotspacemacs/user-init) ((debug error) (configuration-layer//increment-error-count) (spacemacs-buffer/append (format "Error in %s: %s\n" ... ...) t)))))))
spacemacs/init()
(let ((please-do-not-disable-file-name-handler-alist nil)) (require 'core-spacemacs) (spacemacs/dump-restore-load-path) (configuration-layer/load-lock-file) (spacemacs/init) (configuration-layer/stable-elpa-init) (configuration-layer/load) (spacemacs-buffer/display-startup-note) (spacemacs/setup-startup-hook) (spacemacs/dump-eval-delayed-functions) (if (and dotspacemacs-enable-server (not (spacemacs-is-dumping-p))) (progn (require 'server) (if dotspacemacs-server-socket-dir (progn (setq server-socket-dir dotspacemacs-server-socket-dir))) (if (server-running-p) nil (message "Starting a server...") (server-start)))))
(if (not (version<= spacemacs-emacs-min-version emacs-version)) (error (concat "Your version of Emacs (%s) is too old. " "Spacemacs requires Emacs version %s or above.") emacs-version spacemacs-emacs-min-version) (let ((please-do-not-disable-file-name-handler-alist nil)) (require 'core-spacemacs) (spacemacs/dump-restore-load-path) (configuration-layer/load-lock-file) (spacemacs/init) (configuration-layer/stable-elpa-init) (configuration-layer/load) (spacemacs-buffer/display-startup-note) (spacemacs/setup-startup-hook) (spacemacs/dump-eval-delayed-functions) (if (and dotspacemacs-enable-server (not (spacemacs-is-dumping-p))) (progn (require 'server) (if dotspacemacs-server-socket-dir (progn (setq server-socket-dir dotspacemacs-server-socket-dir))) (if (server-running-p) nil (message "Starting a server...") (server-start))))))
eval-buffer(#<buffer *load*> nil "/Users/davidgonsalves/.emacs.d/init.el" nil t) ; Reading at buffer position 3366
load-with-code-conversion("/Users/david/.emacs.d/init.el" "/Users/davidgonsalves/.emacs.d/init.el" t t)
load("/Users/david/.emacs.d/init" noerror nomessage)
startup--load-user-init-file(#f(compiled-function () #<bytecode -0x148fbe78a6b07a7>) #f(compiled-function () #<bytecode -0x1f3c686ddc0d6275>) t)
command-line()
normal-top-level()#2023-01-0401:42FlavaDave> When you say you reinstalled, you totally deleted or renamed ~/.emacs.d?
total deletion#2023-01-0401:44eggsyntaxSurprises me that the errors didn't get mentioned in *messages*, but maybe that's another symptom of it being so messed up?#2023-01-0401:45eggsyntaxSeems like it's looking in .spacemacs.d/ instead of .emacs.d though?#2023-01-0401:47eggsyntaxIs it possible you've got a shell alias somewhere that's got .spacemacs.d by mistake? Or your shell startup is setting that as a value?#2023-01-0401:48FlavaDavethis is *warnings*
Warning (initialization): An error occurred while loading '/Users/david/.emacs.d/init.el':
error: Invalid image type 'svg'
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the '--debug-init' option to view a complete error backtrace.
#2023-01-0401:51FlavaDaveSo, Im not super knowledgable about aliases but I typed alias in the command line and there wasn't spacemacs or emacs when I greped it#2023-01-0401:56eggsyntaxAnd does anything show up if you do env | grep -i emac at the command line?
Alsoā¦youāre starting emacs just with emacs?#2023-01-0401:57eggsyntaxā¦I wonder whether it could somehow be pointing to an unexpected installation of emacs ā Iād still expect that to use .emacs.d though, so not sure it matters, but maybe worth doing which emacs just to see if the result is surprising (dunno how you installed it in the first place).#2023-01-0401:58FlavaDaveenv | grep -i emac returns nothing#2023-01-0401:58FlavaDave> Alsoā¦youāre starting emacs just with emacs?
yes#2023-01-0401:59eggsyntaxOh, hmm, if you do emacs -Q do you get the exact same thing as youāre getting if you just do emacs?#2023-01-0401:59FlavaDavewhich emacs
/opt/homebrew/bin/emacs
#2023-01-0402:00FlavaDaveemacs -Q opens in the same buffer but it looks like old school emacs#2023-01-0402:01eggsyntax> So actually when I do emacs -Q ā ie āstart completely vanilla emacs with no init fileā ā C-x doesnāt work for me either ā my mistake, I thought that was an emacs default, but it must only be spacemacs.
^ is what I started to type, but I take it from your last comment that emacs doesnāt look like old school emacs, it looks still at least somehow spacemacs-ish?#2023-01-0402:01FlavaDaveyes, still spacemacs-ish#2023-01-0402:02eggsyntaxGot it.#2023-01-0402:02eggsyntaxAnd does "/Users/david/.spacemacs.d/ even exist?#2023-01-0402:02FlavaDaveyes#2023-01-0402:03eggsyntaxI still think thatās the likely source of trouble here, that for some reason itās looking in the wrong dir. Unless somehow Spacemacs has shifted to making that its default dir instead of .emacs.d, which I could have missed if so.#2023-01-0402:05eggsyntaxAnother thing to try would be to delete (or move or rename) both ~/.emacs.d and ~/.spacemacs.d, and then try a fresh clone into ~/.emacs.d.
If that doesnāt solve it, Iām about out of suggestions sadly š#2023-01-0402:05eggsyntaxFWIW this is the first Iāve ever heard of a .spacemacs.d directory existing or having any relevance to anything.#2023-01-0402:14FlavaDaveI use this https://github.com/practicalli/spacemacs.d#2023-01-0402:15FlavaDavehttps://practical.li/spacemacs/install-spacemacs/#clone-spacemacs#2023-01-0402:16FlavaDave> Another thing to try would be to delete (or move or rename) both ~/.emacs.d and ~/.spacemacs.d, and then try a fresh clone into ~/.emacs.d.
So, I deleted both and did a fresh clone and it works. But as soon as I use the practicalli spacemacs config, it went right back to square one#2023-01-0402:23eggsyntaxOh, got it, I havenāt used theirs. Looks like it uses different dirs (based on the page you linked), namely ~/.config/emacs and ~/.config/spacemacs; maybe youād have to delete those as well to really get a fresh install? But yeah, no clue on theirs, youād probably have to check with @U05254DQM. Iām glad that at least regular Spacemacs works!#2023-01-0402:27FlavaDaveohh yea that seems new. If you hit the tab for classic config you'll see the ~/.spacemacs.d but i guess I'll have to wait and hear what he says#2023-01-0402:27FlavaDaveThanks for all of your help!#2023-01-0402:27eggsyntaxYou're welcome, good luck!#2023-01-0403:16practicalli-johnnyRemove .spacemacs.d directory and .spacemacs file if they exist
Ensure that there is only one Spacemacs install, either in .config/emacs or .emacs.d (but not both)#2023-01-0403:21practicalli-johnnyThen start Emacs and it should show a simple Spacemacs install wizard in the bottom of the window.
If the major version of Emacs has changed due to the OS updates, a large number of packages will download. Wait for them to finish (ignore warnings) and then restart Emacs
If that works, then yo can consider cloning the Practicalli spacemacs.d directory and removing the .spacemacs file
Using the Practicalli config requires fira code fonts install#2023-01-0403:24practicalli-johnnyIf none of that works, something may be wrong with Emacs. Running emacs -Q will run Emacs without any config. M-x should allow you to call the command to show the Emacs version (type version and the commands will narrow). Hopefully it's version 28 or 27
C-x C-c to quit emacs#2023-01-0403:26FlavaDaveOkay so I tried all of that and it didn't work and my version is 28.1#2023-01-0403:29FlavaDaveI think I just fixed it.#2023-01-0403:29FlavaDaveLooks like I had two emacs installed and one wasn't linked#2023-01-1404:11Drew Verlee@jr0cket is autocomplete still working flawlessly for you? It still flips on and off for me with no real rhythm or reason. i'm starting to blame my diet and the position of Saturn.#2023-01-1409:00practicalli-johnnyI recently deleted my emacs directory and reinstalled Spacemacs which seems to make Spacemacs smother in use generally.
I haven't noticed auto-complete off and on again, although it the past there have been a few times when it wasn't working (although that may have been when I was experimenting with Clojure LSP configuration)#2023-01-1410:23Drew VerleeHuh. Maybe I'll do a reinstall to. Thanks for the idea.#2023-01-1416:42practicalli-johnnyA lot of things can build up in the cache files. Although deleting the cache also deletes history (undo, etc)
I also like to natively compile the package if any of the operating system libraries like libc are updated#2023-01-1421:07Drew VerleeHow do i remove the cache files?#2023-01-1510:38practicalli-johnnyEvery cached should be somewhere in the .config/emacs or .emacs.d directory, in a .cache directory I believe#2023-01-1515:26Drew VerleeThanks I'll see if cleaning that out helps.#2023-01-1613:38practicalli-johnnyFYI, I've been using Doom Emacs for a few days and yesterday I had auto-complete stop working. When I started Emacs again today, then auto-complete was working again.
So it suggests there is an intermittent issue somewhere in one of the Emacs packages (which is going to be tricky to diagnose - at least for me anyway š )#2023-01-1804:35Drew VerleeI had the same issues.
Let me know if i can help. I would absolutely like to learn how to figure this out. What's more, i'm very interested why everyone isn't screaming about this issue everywhere.
Eric mentioned a way to check what was doing autocomplete, but the logs were so noisy i wasn't sure what to make of the events i was seeing. But i can find the thread, thats where i was going to start reading about next.#2023-01-2116:35didibusInteresting, I still haven't had this issue.
You can inspect: completion-at-point-functions#2023-01-2116:45didibusThe completion command is: completion-at-point
You should also just try running: completion-at-point to see if that can do auto-complete. If it can, the issue might be with Emacs not calling that function on key-press for example, where it should.
If calling the command still doesn't succeed in doing completion, there might be an issue with completion-at-point-functions like the list might be empty for example. It should be a list of functions that perform auto-complete. The completion-at-point command tries the functions in order.#2023-01-2313:54practicalli-johnnyHad autocompletion stop again yesterday in Doom Emacs, tried completion-at-point and nothing happened. Had to quit Emacs and restart before it worked (restarting Emacs didn't help)#2023-01-2417:31Drew VerleeWhen i get an java exception the cursor jumps to the top of the page. How do i make that not happen? why is it happening?#2023-01-2418:27practicalli-johnnyDo you mean the cursor jumps to the buffer that shows the exception instead of staying in the source code buffer (where I assume the code was evaluated and caused the exception to occur)?
I am sure that is a cider variable, something like jump to exception...#2023-01-2418:31practicalli-johnnyIf I understand correctly, its probably one of these CIDER eval variables that can be set to disable the behaviour that is not required (not sure which one exactly)
https://practical.li/spacemacs/reference/cider/configuration-variables/#cider-evalel#2023-01-2418:32practicalli-johnnyThere may be some more useful information in these cider docs
https://docs.cider.mx/cider/usage/dealing_with_errors.html#2023-01-2418:32Drew VerleeNo I mean it jumps to the top of the namespace. I can't imagine why this would be desirable or what's causing it to happen.#2023-01-2418:33practicalli-johnnyOh, then something seems very broken....
You could try adding this to the dotspaceamcs/user-config
(setq cider-auto-select-error-buffer nil)
#2023-01-2418:35practicalli-johnnybut might help narrow the issue down to CIDER if it stops the jumping... and then a bug can be reported with CIDER or Clojure-mode.
If its still jumps then its probably not cider.... but I dont know enough to be definate#2023-01-2418:35practicalli-johnnyOr disable the Error popup all together and see if its still happens...
(setq cider-show-error-buffer nil)
#2023-01-2418:36practicalli-johnnyI'd also switch of clj-refactor if its on and stop the clojure lsp server as other possible things to make the cursor jump#2023-02-0316:40Drew VerleeI was wrong before when i said an error caused the cursor to jump to the top of the page.
It happens right now when i try to auto-complete. š¢#2023-02-0318:17practicalli-johnnyCurious. I sometimes get the cursor jump to the bottom of the buffer when the autocompletion popup appears.
It seems to be most prevalent when the cursor is something like last 10-15 lines from the bottom.
It's happened on Spacemacs and a couple of time on Emacs Doom. So assume it's either a package or something built into Emacs that is the cause#2023-01-2615:28BlackDo I need to add extra configuration for clj-refactoring package to work? Only available commands after , r a are to print namespace, I cannot find commands like add a missing libspec etc.#2023-01-2615:30eggsyntaxIIRC you may need to set a variable when you add the clojure package. Instead of just adding (in dotspacemacs-configuration-layers)
clojure
you need
(clojure :variables
clojure-enable-clj-refactor t
)#2023-01-2615:33BlackI did that, yet no new commands are available#2023-01-2615:55practicalli-johnnyRestart Emacs or reload the Spacemacs config to download the clj-refactor package and load clj-refactor key bindings when opening a Clojure file#2023-01-2615:59practicalli-johnnyOr use Clojure LSP to provide these type of refactor commands
https://practical.li/spacemacs/install-spacemacs/clojure-lsp/#2023-01-2616:30BlackOk I did not load .spacemacs.d properly, everything is working now, thanks!! ā¤ļø#2023-02-0617:16BlackQuestion about
Example code:
(fn [a b]
(fn-with a)
(fn-with b))
So if I delete last line with d d then closing parens is moved to line above as expected. But when I just need to comment out last line, using SPC ; ; result is unbalanced code:
(fn [a b]
(fn-with a)
;; (fn-with b))
Is there any solution for this?#2023-02-0617:22tomd(sorry I don't use spacemacs, but I have notifications for evil as the maintainer) - what function is SPC ; ; calling? As evil-cleverparens doesn't do commenting-out, I assume it's a lib like evil-comentary or evil-nerd-commenter which may be to blame.#2023-02-0617:32Blackevilnc-comment-operator I guess?#2023-02-0617:32tomdyeah, so I just checked, evil-nerd-commenter doesn't do "structural commenting"#2023-02-0617:34tomdI don't maintain either, but I do maintain evil-cleverparens. I could have a think about whether it should intercept/override evil-commentary and evil-nerd-commenter to add structural sensitivity, or even just provide bindings of it's own :thinking_face:#2023-02-0617:34tomdIf you have any thoughts, feel free to leave an issue on the evil-cleverparens github issue page#2023-02-0617:37tomdRight now, with the cursor in (fn-with b) you can probably do SPC ; a( to achieve what you want#2023-02-0914:58erwinrooijakkersWhen I hold my cursor on a clojure function that generates a doc, my cursor changes from yellow to pink, presumably because of evil-motion-state . Is there a way to keep the cursor yellow? This happened after updating to Emacs 29 if I remember correctly.#2023-02-1012:23shanHey all,
I've recently updated my spacemac to the latest dev, it seems to have changed the behaviour of Projectile files
Previously, it would fuzzy match with file name matching displaying at the top, now it's just sorted on the whole file path.
e.g.
search for "company"
With files:
src/company/adder.clj
src/company/company.clj
This returns the files in order
src/company/adder.clj
src/company/company.clj
But previously I was sure this would return:
src/company/company.clj
src/company/adder.clj
Anyone know if there's a setting that I need to change for the previous behaviour?#2023-02-1012:31shanactually, it seems like SPC p f is now using helm-projectile-find-file now.
projectile-find-file was the behaviour I was previously experiencing!#2023-02-1015:21shanended up setting helm-projectile-fuzzy-match to nil to get the previous behaviour I had#2023-02-2209:46practicalli-johnnyUpdated https://practical.li/spacemacs/debug-clojure/sayid-debug/ page to clarify alias definitions require the sayid middleware in :main-opts to run correctly.
So the preferred workflow is to use cider-connect
Added a note that using jack-in is a little problematic (although technically achievable - I can document how to configure jack-in to run sayid using a .dir-locals.el config if it is of value - let me know)#2023-02-2301:09Cora (she/her)I think the first link to the project is broken? I tap the "Sayid" link and get a github pages 404#2023-02-2301:55practicalli-johnnyAh yes, the project repository move to the orchard... https://github.com/clojure-emacs/sayid
I'll fix in the morning, thanks#2023-02-2604:33Drew VerleeI now believe a lot of my emacs woes are caused by smartparens. The woe was that emacs would hang and use 100% of my cpu. Last time this happened, i pressed Ctrl-G a couple times, and magically, regained control and the cpu usage dropped. There is a github issue on smartparens vaguely related to this kind of behavior.#2023-02-2616:26jumarDid you try to profile it?#2023-02-2617:01Drew VerleeI didn't. When it hung before i didn't know a way to get feedback because it wasn't responsive.#2023-03-0701:25practicalli-johnnyA major refactor is underway for Practicalli Spacemacs Config
⢠update repository name to https://github.com/practicalli/spacemacs-config
⢠rename live branch to main (and updated GitHub workflows)
⢠refactor the configuration via https://github.com/practicalli/spacemacs-config/pull/7
⦠add autocomplete and clojure layer variables to optomise LSP usage
⦠update lsp variables to minimise breadcrumb trail to current namespace and function/var
⦠add https://dandavison.github.io/delta/using-delta-with-magit.html to git layer - improved diff highlighting
⦠migrate custom configuration to separate files, so unwanted sections can easily be ignored by commenting load-file expression(s)
āŖļø clojure-config.el - clojure-mode options, evil-cleverparents enable, portal tap> on nrepl & keybindings, custom elisp functions
āŖļø theme-config.el - theme and mode-line configuration
āŖļø org-config.el - notes and task faces and workflow
āŖļø version-control-config.el - git, Magit and Forge configuration (predominantly forge config)
⦠deprecated redundant code - moved to deprecated-config.el for historical reference
āŖļø theming - layer and dotspacemacs/user-init code
āŖļø any config that could be added as layer variables (or already was)#2023-03-0701:27practicalli-johnnyTo update the branch name on existing clones:
git branch -m live main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
Or move an existing clone out of the way and create a new clone from the updated repo (after the pr is merged) and run a diff tool against any changes you have made#2023-03-0715:01practicalli-johnnyThe pull request is ready to merge I believe. I'm going to do some more testing to make sure everything is good
Any comments welcome
https://github.com/practicalli/spacemacs-config/pull/7#2023-03-0922:04practicalli-johnnyI've create https://github.com/syl20bnr/spacemacs/pull/15948, a handy tool for showing keybindings and commands as you type.
Keycast has already been added to the command-log layer and includes the keycast-tab-bar-mode, keycast-header-line-mode and keycast-mode-line-mode commands (although the modeline insertion is classed as experimental - it seems to replace everything on the modeline with itself, rather than be incorporated with other info). If you have ideas of how to insert keycast in the mode line along with other information then it would be most welcome.
I find keycast useful for
⢠learning commands (or figuring out what I did when something unexpected happened)
⢠demos and screencasts so people can easily follow the key bindings and commands used (hopefully there will be more Practicalli screencasts this year)
The tab bar to be the best placement for the keycast output, which appears in the top-right of the frame#2023-03-1201:45practicalli-johnnyI'm now running Emacs 29 with Spacemacs and the Practicalli Spacemacs config, without any issues noticed so far.
Emacs 29 does seem to run a little faster than 28 (which in turn ran a lot faster than Emacs 27).
I built Emacs 29 from source with the --native-compilation=aot option, so it would compile the Emacs lisp files that ship with Emacs source code during compilation (rather than when first starting Emacs)
The speed increase of 29 could be due in part to compiling the source code on newer versions of Ubuntu packages for the compiler and tools... or just doing a new install...
I've documented how to build Emacs from source on Ubuntu in
https://practical.li/blog/posts/build-emacs-from-source-on-ubuntu-linux/
I havent tapped into any of the new features of Emacs 29 yet, such as treesitter or Eglot, but they both sound quite interesting and will try them out in the coming months (when I figure out how to do so).#2023-03-1819:43FlavaDaveFor some reason, cider-pprint-evel-defun-at-point still prints, but doesn't print pretty anymore. Does anyone know what I can do to address this?#2023-03-1820:53practicalli-johnnyfor hash-maps I get pretty printed output, but a sequence containing a hash-map is printing it flat (very small code sample though)
If example code can be shared I can give it a try#2023-03-1822:06FlavaDaveI figured out what it was#2023-03-1822:06FlavaDaveso when I so cider-jack-in-clj I get pretty printing just find. When I start a repl from terminal and do cider-connect-clj I lose pretty printing.#2023-03-1900:35practicalli-johnnyThe issue may be due to cider-nrepl middleware not being included when starting a repl in the terminal
For Clojure CLI I use an alias as follows to include the cider-nrepl middleware (I assume Leiningen would include it as an alias - its been a while)
;; Interactive client REPL with nREPL server for Clojure Editor support
:repl/basic
{:extra-deps {nrepl/nrepl {:mvn/version "1.0.0"}
cider/cider-nrepl {:mvn/version "0.30.0"}}
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[cider.nrepl/cider-middleware]"
"--interactive"]}
Seems to work using the example on https://clojuredocs.org/clojure.pprint/pprint use the cider pprint command#2023-03-1903:18FlavaDavethat makes sense! thanks#2023-03-2020:57SergioWhen following the guide to install the config using Free Desktop XDG config it doesn't work. Only worked with the Classic config . It's expected an extra configuration in the XDG case?#2023-03-2021:03practicalli-johnnyAppologies, it seems I didnt add the SPACEMACSDIR environment variable needs to be set, either in .bashrc or .zshenv (or the configuration for the shell being used)
export SPACEMACSDIR=$XDG_CONFIG_HOME/spacemacs
#2023-03-2021:04practicalli-johnnyI did add it to the Termux setup... I'll add it to the main install too
https://practical.li/spacemacs/termux/setup/#configure-freedesktoporg-xdg-locations#2023-03-2021:04Sergiooh cool, thank you for the info!#2023-03-2403:57Drew Verleehow do i make sp-copy-sexp not copy comments? Or how do you copy a list/expression/map in a comment and not have it copy the comment part as well. e.g#2023-03-2409:21practicalli-johnnyRather than use line comments, I assume using the Clojure reader comment #_ or comment function would work correctly when copying the expression#2023-03-2403:58Drew Verlee;; (set! spec/*explain-out* (expound/custom-printer {:show-valid-values? true
;; :theme :figwheel-theme}))
copy the set! expression and paste and i get this:
(set! spec/*explain-out* (expound/custom-printer {:show-valid-values? true
;; :theme :figwheel-theme}))#2023-03-2403:59Drew Verleei assume it's just reading chars and picks up the comment ones? like it doesn't understand clojure comment symbols should be ignored maybe.#2023-03-2721:29Drew Verleei evaled some code and got a "unable to resolve symbol" exception.
That's fine, whats not fine is that it moved my cursor to the exception buffer, despite me having cider-auto-select-error-buffer ni and, in the window where the error happened, It jumped all the way to the top of the namespace.#2023-03-2722:04practicalli-johnnyDoes the cursor move to the top of the buffer if the error buffer is shown and immediately quit with q
That is the approach I take. I've never noticed the cursor moving
Tomorrow, I'll try disable the error buffer and call something that is not defined in the namespace and see what happens#2023-03-2722:21Drew VerleeIn this case, the cursor moved to the error buffer. If i hit q, it moves back to the file, but it's at the top of the ns (far from the expression evaled).
This expression, was a symbol that clojure had never seen. One that i evaled directly using cider eval last expression.
This isn't something i do often (eval symbols that aren't defined, it happened here bc i assumed the ex of expression had already been hit before (it was a def). I can probably avoid it in this case by evaluating the def (def foo foo) add not just the symbol foo.
I'm doing this to debug something.
Thanks for reading into this. :)
Now that i know why, it's a tiny bit less frustrating...#2023-03-2721:32Drew Verleeif i set cider-show-error-buffer to nil, that works, but it still jumps to the top of the namespace.#2023-03-2722:12practicalli-johnnyFrom the Cider docs it suggest that only
(setq cider-show-error-buffer nil)
is required to disable the error buffer, so suggest the other variable not be changed (it shouldn't make a difference, but just in case it does something unexpected)#2023-03-2721:34Drew Verleei guess it's because the error is considered to be an issue compiling the whole namespace?
Unhandled clojure.lang.Compiler$CompilerException
Error compiling src/centriq_web/property_report.clj at (0:0)
#2023-03-2721:40Drew Verleehmm it's because the symbol isn't defined anywhere. e.g i put a (def foo 1) then revealed foo, but the outer expression never got ran, so ... boom?#2023-03-2813:59practicalli-johnnyInteresting, I found inconsistency in how the cursor behaves when there is an error evaluating Clojure code
1. Calling a function that is not defined will jump to the opening bracket of the call expression, (foo)
2. Calling an evaluated function with incorrect number of arguments does not move the cursor
3. Evaluating a non-existent symbol blahblah jumps to the top of the namespace
I assume this is inconsistency in Cider code somewhere.
The jump locations were the same regardless of the cider error buffer being enabled.#2023-03-2920:48Drew Verleeim the only one asking questions in here š
Here is another one. When i leave spacemacs and then travel back, often times my "search" buffer seems to freeze. As in, you see in this picture how I'm typing "learn"? Well i can't keep typing there. I have no idea what state it's in. Pressing "m" or C-z, doesn't do anything.#2023-03-2920:56practicalli-johnnySPC w b switches focus to the mini buffer (where the lean text is)#2023-03-2920:59practicalli-johnnyWhen using the mouse to switch back to Spacemacs the focus will become the buffer under the mouse pointer. So either use SPC w b to switch the current buffer to the mini-buffer, click in the mini-buffer (can have side effects , like canceling or confusing the command using the mini-buffer), or use the operating system keyboard shortcuts to switch between applications
I use the desktop key bindings to switch back to Emacs (but then I have a nice tiling window manager that make it very simple)#2023-03-3118:18Epidiah RavacholHello there, I'm stepping out of my Vim comfort zone to give Spacemacs a shot, and I've got a pretty rudimentary question, with likely more to follow: How do I evaluate a form that would sit at the top level if it wasn't inside the (comment ...) ? The things I'm trying are either too precise and evaluate inner forms and elements, or they evaluate the entire comment form. Any help would be appreciated.#2023-03-3118:45practicalli-johnny, e f will work but needs a cider option added to the Clojure layer
clojure-toplevel-inside-comment-form t
The configuration I us is documented at https://practical.li/spacemacs/install-spacemacs/enhance-clojure-experience/#clojure#2023-03-3118:55Epidiah RavacholExcellent! I couldn't tell if I was misreading the keymaps or missing some config. Now I'm going to dig into your whole site and see what else I was missing. Thanks!#2023-03-3120:21practicalli-johnnyThere is a complete user config for spacemacs you can use or borrow ideas from https://github.com/practicalli/spacemacs-config#2023-04-0123:26Epidiah RavacholI've got another newbie question here. In Clojure-mode using Which-Key, pressing , r brings up the "refactor" menu. There are a bunch of prefixes like "hotload," "introduce/inline" and "move" that don't appear to do anything. When I try them, I get a message from Which-Key that says there are no keys to show. Keying in , ? explains this:
The package clj-refactor is disabled by default.
To enable it, add the following variable to the clojure layer
in your Spacemacs configuration:
dotspacemacs-configuration-layers
'(...
(clojure :variables
clojure-enable-clj-refactor t)
)
My question is, if I want to leave clj-refactor disabled, for now, is there a way to remove these key maps from the Which-Key menu? I don't think I had them there before, but I can't think of what I did to make them appear.#2023-04-0203:34Drew VerleeI assume that binding will go away if you change that t to nil.#2023-04-0203:35Drew Verleeerr maybe it doesnt. odd#2023-04-0213:08Epidiah RavacholHuh, I thought it was just me. Or rather, I didn't notice it until late last night and because I'm still very new at this, I assumed it was because of some setting I accidentally set. But scrubbing my .spacemacs and starting fresh with just clojure-mode installed, I see the empty options are still there. So maybe it's been that way all along?#2023-04-0312:20practicalli-johnnyThe code that sets up the prefix names (sub-menu names) seems strange
https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Blang/clojure/packages.el#L392-L450
It shouldnt make any difference to the refactor bindings if lsp or cider is the backend.
The only condition should be if clj-refactor is enabled. When clj-refactor is enabled, then the prefix names and key bindings should be included.
I tried hacking around this and its easy enough to drop the clj-refactor specific prefixes, but then the names dont show when clj-refactor is enabled š I need to go to Emacs Lisp school š#2023-04-0312:23practicalli-johnnyThe prefixes that should be included for clojure-mode are
'(("mra" . "add")
("mrc" . "cycle/clean/convert")
("mrr" . "remove/rename/replace")
("mrs" . "show/sort/stop")
("mrt" . "thread")
("mru" . "unwind/update")
)
Everything else should only be added if clojure-enable-clj-refactor t is set#2023-04-0312:31Epidiah RavacholThanks! I ended up adding clj-refactor anyway while experimenting in search of the cause of all this and just left it in. I was only really avoiding it because the clojure-mode documentation seemed to be warning against it. But this is very helpful and could save me some aggravation if clj-refactor turns out not to be a good fit.#2023-04-0313:04practicalli-johnnyClj-refactor did loose a maintainer for quite a while.
I think it's now being maintained by the cider maintainer now and has been brought up to date (or at least enough to not cause so many issues)
In the meantime many of the refactoring tasks had already moved to closure mode and closure LSP also provides a lot of refactoring so there's quite a bit of redundancy across all three tools#2023-04-0313:09practicalli-johnnyI rarely use any of these tools myself#2023-04-0405:06murtaza52Hi, I had to reinstall emacs/spacemacs/practicalli's config for spacemacs.
I am having trouble with magit. When I do SPC g s, it goes to the magit buffer, but does not show anything in the Unstaged section (its empty).
This is the message line in the Messages buffer - apply: Searching for program: No such file or directory, delta
Any ideas what is going on ?#2023-04-0408:34practicalli-johnnySounds like it can't find git binary on the Emacs PATH
I think SPC f e e opens spacemacs.env file that contains the Emacs PATH details
I assume a git binary is installed on the operating system#2023-04-0408:38practicalli-johnnyAh no. I know what the problem is. I started using git-delta to make the diff much nicer.
Either install git delta https://github.com/dandavison/delta/releases
Or comment the git delta variable in the magit layer variables in the Spacemacs config , SPC f e d
git-enable-magit-delta-plugin t
Set to nil, comment or remove this variable#2023-04-0409:48practicalli-johnnyI pushed a change that comments this variable in the magit layer and added a comment that the delta tool should be installed before enabling. Thanks for letting me know and helping me improve the config.#2023-04-0411:54murtaza52My suggestion - instead of commenting it out, you could include the installation of git delta in the instructions on your site.
Are there any other optional tools, that have to be enabled / installed ? I just use your config out of the box.#2023-04-0411:55murtaza52thanks for the quick response.#2023-04-0412:45practicalli-johnnyhttps://practical.li/spacemacs/install-spacemacs/pre-install/#command-line-tools has the recommended tools.
Although looking again I realise I haven't included Git either.
I will add git and suggest git delta as an optional extra. Delta isn't essential though and depending on theme used can be useful or get in the way, so I will keep it comment and provide info for a person to make the choice
Thanks for the feedback#2023-04-0413:40murtaza52I installed delta, yup it does make the diffs more clear/beautiful#2023-04-0410:34practicalli-johnnyI've release a relatively minor change to the Practicalli Spacemacs config - most importantly making Git delta in magit a feature that has to be uncommented to use (as issues arise in magit status if the delta binary is not present
https://clojurians.slack.com/archives/C015AL9QYH1/p1680604293606299#2023-04-0413:43murtaza52After new install of spacemacs, I get these warnings on emacs startup-
Auto-evilification could not remap these functions in map 'archive-mode-map':
- 'archive-chgrp-entry' originally mapped on 'G'
Auto-evilification could not remap these functions in map 'cider-docview-mode-map':
- 'cider-docview-clojuredocs-web' originally mapped on 'G'
#2023-04-0414:16practicalli-johnnyI've had similar warnings to these for a while, they don't seem to affect anything#2023-04-0414:22murtaza52cool thanks#2023-04-0413:47murtaza52Also this one -
Package 'all-the-icons' isn't installed
While I did install the all-the-icons-install-fonts#2023-04-0414:15practicalli-johnnyI also get this warning but seems to work regardless#2023-04-0414:40murtaza52One issue I always face in the magit buffer is that the screen freezes for a few secs, this happens frequently when I am looking at diffs etc.
Any reason this happens ? This used to happen in the previous installation too. I just reinstalled everything emacs, spacemacs etc - but the issue continues.#2023-04-0415:48Drew VerleeIll check to see if this happens to me too.#2023-04-0419:40SergioHi, when I installed the first time the spacemacs config the terminal layer wasn't working, the reason is that by default it looks for the bin under /bin/zsh but that depends on the type of mac itself:
> To set zsh as your default shell, execute the following assuming a default install of Homebrew
> ⦠Recent macOS versions:
> āŖļø For m1 macs:
> ⢠chsh -s /opt/homebrew/bin/zsh
> āŖļø For intel macs:
> ⢠chsh -s /usr/local/bin/zsh
> ⦠macOS High Sierra and older:
> āŖļø chsh -s /bin/zsh
>
Source: https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH#how-to-install-zsh-on-many-platforms . Maybe add a comment? or, is there a way to keep it compatible regardless machine/OS?#2023-04-0508:57practicalli-johnnyThe Spacemacs docs state terminal-here is used to detect the default shell. There are variables that can be set for each OS, but I didn't see anything for the different variations of MacOSX
https://develop.spacemacs.org/layers/+tools/shell/README.html#external-terminal-emulator
I never noticed an issue when I used a Mac last year. I use vterm as the launched shell that seemed to work just fine with the zsh I was using.
Personally I would add a symbolic link on the operating system file system so the MacOSX laptops all had the same /bin/zsh or what ever default location is preferred#2023-04-0513:18Sergiook, I think makes sense, thanks!#2023-04-0513:27practicalli-johnnyUnfortunately I don't have access to the various versions of MacOSX to test any other ideas.
I am surprised it's installed in different places on MacOSX, I wonder why that is#2023-04-0513:36Sergiobetween intel vs arm the reason seems to be https://github.com/Homebrew/brew/issues/9177:
> In #9117, we switched to a new prefix of /opt/homebrew for installations on Apple Silicon. This was written and shipped with heroic speed to help prevent strange issues with bleeding edge users on the first consumer Apple Silicon Macs.
> āMisty De MĆ©o - Homebrew Maintainer
#2023-04-0513:36Sergiobut, between that and high sierra change is not clear to me#2023-04-0517:59Epidiah RavacholI'm really digging Spacemacs so far. I've got to build up some new muscle memory, but that's the fun part. There are definitely more questions about my config and errors in my future. For now, though, I just wanted to say that I'm glad I gave this a shot!#2023-04-0519:42practicalli-johnnyGreat to hear you are finding Spacemacs valuable.
I've been using Spacemacs for around 8 years and it has made a significant improvement to my development workflow.
I like all the little touches that make things really easy to do, e.g SPC v to select a word and a further v to expand the selection (or V to shrink the selection.
It does take time to learn (or even discover) all the features of Spacemacs. I found thehttps://develop.spacemacs.org/layers/LAYERS.htmlvery useful and hopefully the https://practical.li/spacemacs/ is of help.#2023-04-0520:05Epidiah RavacholOh that SPC v is a nice trick! Yeah, Practicalli has been a lot of help. I find myself returning to it again and again.#2023-04-0523:47zaneFor a more vim-y way to expand the current selection you can also just repeat a motion, like so:#2023-04-0601:15Epidiah RavacholSo, SPC x R has the very tantalizing label +Randomize in the which-key menu, but from there "There are no keys to show." Which is fine. I was just excited to randomize my text. But it did leave me with a question: Is there a convenient way to discover what added this (or things like it) to the which-key menu?#2023-04-0608:42practicalli-johnnySPC h d menu has commands for describing key bindings, variables, functions, etc
The description should say which file something was described in#2023-04-0612:25Epidiah RavacholThank you! That's a very helpful menu to have!#2023-04-0613:38Epidiah RavacholAh, but in this case, I may have spoken too soon. It seems that since SPC x R is a prefix awaiting another key, I can't ask Spacemacs to describe the key directly.#2023-04-0614:54practicalli-johnnyCurious. I did a search through the Spacemacs code and SPC x R is set a s a prefix (a which-key sub-menu) in layers/+spacemacs/spacemacs-defaults/keybindings.el but I have not found any commands that reside under that prefix (sub-menu)
The SPC x R binding is also defined in the https://develop.spacemacs.org/layers/+tools/xclipboard/README.html, but I think the prefix is taking preceedence (or the xclipboard layer is not included by default)
There are some default functions for randomising words and lines defined in layers/+spacemacs/spacemacs-defaults/funcs.el which should be available by default
SPC SPC spacemacs/randomize-lines
SPC SPC spacemacs/randomize-words#2023-04-0615:41Epidiah RavacholThank you, again. There's nothing pressing about the solution to the actual mystery. But these tools should help me solve future mysteries when they arise.#2023-04-1114:54Epidiah RavacholEvery so often Spacemacs stops everything to ask me if I want to steal savehist from myself. I'm not entirely sure what's going on there.#2023-04-1114:54eggsyntaxGuessing you've got multiple spacemacs instances running? & they're both trying to own the same savehist file. Or at least those are the conditions under which I encounter that.#2023-04-1114:59Epidiah RavacholI thought it might be something like that. I am running an emacsclient off of a server, but I thought I only had one client running. Going to restart the whole thing and pay closer attention.#2023-04-1412:58practicalli-johnnyUpdate a PR to add a draft PR toggle in Magit Forge, removing the need to visit the GitHub website to set a PR to draft status (so even more https://practical.li/spacemacs/source-control/magit/forge/)
https://github.com/syl20bnr/spacemacs/pull/15553#2023-04-2101:13Drew Verleefwiw i found found the git option git-enable-magit-delta-plugin t to more or less result in utter chaos a lot of the time, can't recommend it.#2023-04-2106:33practicalli-johnnyIt depends on the Emacs theme used as to how useful delta is. That variable is already commented, so is optimal.
If you don't have delta installed, then it affects the magit status view (because it has no diff tool to execute and doesn't seem to fall back to the normal diff)#2023-04-2115:55Drew VerleeWhat theme have you found works best? Maybe i could switch to it when i use the git status buffer.#2023-04-2115:58practicalli-johnnyI commented the variable and no longer use delta for the diffs. It didnt add much for me. Also if the theme changes whist in Magit Status, then you have to quit magit status and restart it to apply the theme change.
I use doom-gruvbox themes and the dark version does not work well with the delta theme. The doom-gruvbox light is okay, but nothing spectacular.#2023-05-0804:13Drew VerleeWhere should i set variables? I have the expression (setq blah "blah") inside my dotspacemacs/user-config expression, which i thought would be permanently set. However, i keep having to eval it after emacs loads.#2023-05-0806:44practicalli-johnnyIf a variable is for a Spacemacs layer, the it can be defined via dotspacemacs-configuration-layers or in dotspacemacs/user-config using a setq
Otherwise define the variable in dotspacemacs/user-config which should over-ride package and init settings.#2023-05-0806:54practicalli-johnnyI believe values are saved in dotspacemacs/emacs-custom-settings so in theory there could be a conflicting value, but this is unlikely.
This section (or emacs-custom-settings.el file in the Practicalli Spacemacs config) can be removed and Spacemacs will recreate it from the other values in the Spacemacs config file
NOTE: any changes made by via Emacs customize command will be lost when removing dotspacemacs/macs-custom-setting or
emacs-custom-settings.el (create a copy of not sure)#2023-05-0815:58Drew Verlee@U05254DQM thanks. Any idea why calling functions inside user-config wouldn't be active after it loads? for example
(require 'gptel)
(setq gptel-model "gpt-4")
#2023-05-0818:01practicalli-johnnyMy initial guess would be the package is not available, but that should show an error in the *messages* buffer.
Is the package that provides gtel added via dotspacemacs/additional-packages#2023-05-0818:04Drew VerleeIt's available, if i run those expressions they work.
Maybe i have an error further up and it prevents them from executing.#2023-05-0917:51pauldI updated spacemacs (develop) today and can no longer jack in. cider connect works.
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Error building classpath. Don't know how to create ISeq from: clojure.lang.Symbol
java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol
#2023-05-0917:53pauldYou should be able to reproduce by pulling the develop branch, updating emacs packages and trying to jack-in with any project.#2023-05-0919:30practicalli-johnnyI am unable to replicate the issue with cider-jack-in-clj command. The full command used by CIDER is
[nREPL] Starting server via /usr/local/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "1.0.0"} cider/cider-nrepl {:mvn/version "0.30.0"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
I am not using any aliases and not pulling in dev/user.clj files#2023-05-0919:33practicalli-johnnyMy initial thoughts are something else is being included when using cider jack-in, check for a .dir-locals.el file.
Or Emacs was not restarted after the packages were installed.
Or it could be a faulty package download. Try move the cider packages out of the spacemacs elpa directory and restart Emacs to download packages again#2023-05-0919:57pauldI deleted my cider packages an restarted, but that didn't help. So strange. I had this working yesterday before updating. Here is my error mostly in full:
Starting new CIDER session ...
[nREPL] Starting server via "c:/Users/Paul Dumais/scoop/shims/clojure.exe" -Sdeps '{:deps {nrepl/nrepl {:mvn/version "1.0.0"} cider/cider-nrepl {:mvn/version "0.30.0"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Error building classpath. Don't know how to create ISeq from: clojure.lang.Symbol
java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol
at clojure.lang.RT.seqFrom(RT.java:557)
at clojure.lang.RT.seq(RT.java:537)
at clojure.core$seq__5467.invokeStatic(core.clj:139)
at clojure.core$merge_with$merge2__6033.invoke(core.clj:3083)
at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:63)
at clojure.core$reduce1.invokeStatic(core.clj:944)
at clojure.core$reduce1.invokeStatic(core.clj:936)
at clojure.core$merge_with.invokeStatic(core.clj:3076)
at clojure.core$merge_with.doInvoke(core.clj:3068)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.core$apply.invokeStatic(core.clj:669)
at clojure.tools.deps$merge_edns.invokeStatic(deps.clj:141)
at clojure.tools.deps.script.make_classpath2$run_core.invokeStatic(make_classpath2.clj:86)
at clojure.tools.deps.script.make_classpath2$run.invokeStatic(make_classpath2.clj:153)
at clojure.tools.deps.script.make_classpath2$_main.invokeStatic(make_classpath2.clj:203)
at clojure.tools.deps.script.make_classpath2$_main.doInvoke(make_classpath2.clj:174)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.main$main_opt.invokeStatic(main.clj:514)
at clojure.main$main_opt.invoke(main.clj:510)
at clojure.main$main.invokeStatic(main.clj:664)
at clojure.main$main.doInvoke(main.clj:616)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.main.main(main.java:40)
("exited abnormally with code 1")
error in process sentinel: Could not start nREPL server: Error building classpath. Don't know how to create ISeq from: clojure.lang.Symbol
java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol
at clojure.lang.RT.seqFrom(RT.java:557)
at clojure.lang.RT.seq(RT.java:537)
at clojure.core$seq__5467.invokeStatic(core.clj:139)
at clojure.core$merge_with$merge2__6033.invoke(core.clj:3083)
at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:63)
at clojure.core$reduce1.invokeStatic(core.clj:944)
at clojure.core$reduce1.invokeStatic(core.clj:936)
at clojure.core$merge_with.invokeStatic(core.clj:3076)
at clojure.core$merge_with.doInvoke(core.clj:3068)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.core$apply.invokeStatic(core.clj:669)
at clojure.tools.deps$merge_edns.invokeStatic(deps.clj:141)
at clojure.tools.deps.script.make_classpath2$run_core.invokeStatic(make_classpath2.clj:86)
at clojure.tools.deps.script.make_classpath2$run.invokeStatic(make_classpath2.clj:153)
at clojure.tools.deps.script.make_classpath2$_main.invokeStatic(make_classpath2.clj:203)
at clojure.tools.deps.script.make_classpath2$_main.doInvoke(make_classpath2.clj:174)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.main$main_opt.invokeStatic(main.clj:514)
at clojure.main$main_opt.invoke(main.clj:510)
at clojure.main$main.invokeStatic(main.clj:664)
at clojure.main$main.doInvoke(main.clj:616)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.main.main(main.java:40)
("exited abnormally with code 1")
Beginning of buffer [3 times]
Mark set
<left-fringe> <mouse-1> is undefined
Mark set #2023-05-1009:11practicalli-johnnyI suggest trying an Emacs package rollback, there is a link to this on the Spacemacs home buffer (`SPC b h`)#2023-05-1009:15practicalli-johnnyIf previously used packages no longer work, then perhaps something is wrong with the Java and/or Clojure tool installed on windows
If packages do work, then it suggests there is an issue with one or more of the packages. Check which package has been updated recently (i.e. cider-nrepl was updated a few days ago)#2023-05-1012:00pauldI tried rolling back the packages I installed. Now I will try checking out a previous commit of spacemacs develop.#2023-05-1012:05pauldI went back pretty far and I still see the same error. I might have something to do with the state of my .m2 directory.#2023-05-1012:19pauldI tried deleting that, but the error occurs before attempting to download deps it seems.#2023-05-1012:20pauldI'm going to try a different test project.#2023-05-1012:22practicalli-johnnyI would be surprised if the Spacemacs code is related, there have only been a couple of commits to the clojure layer in the last year.
Did something change with the scoop install of Java or Clojure ?
The error message seems to suggest there is a bug in nrepl or something that is sent to nrepl, or possibly something in the code. If there is a user.clj file on the path, that can cause problems, but the error message would usually mention that namespace rather than nrepl. If there is a user.clj file and it has nrepl requires or related code, it could be causing an issue (assuming it exists or is on the path).
I test issues such as this across multiple projects and create a new very simple Clojure project to test if needed#2023-05-1012:25pauldyeah, it seems not to be spacemacs relatead. I'll crosspost in a little bit when I have more info. Thanks!#2023-05-1012:26pauldI'm using a test project created by seancorfield's clj-new#2023-05-1012:37pauldPosted over on clj-on-windows.#2023-05-1608:55practicalli-johnnySpacemacs Magit can now https://github.com/syl20bnr/spacemacs/commit/0260abc8c4644c0bb83833c6adfbbdad962b8828 (for those times when you want to spend a bit more time working on the PR or need some initial feedback)
, m d toggle draft status when viewing a pull request (in the git layer along with Magit and Forge)
I create pull requests from Magit Status buffer using forge, so I dont need to visit the GitHub website to do so.
⢠SPC g s to open magit
⢠@ a to add the repository to Magit Forge and download the topics (issues, prs) or @ f f to refresh the topics if the repository was already added
⢠@ c p to create a pull request, selecting the branch with the changes then the branch to merge into
⢠Edit the pull request description in the buffer that pops up and optionally toggle to draft
⢠, , or Z Z to complete the pull request description and send it to GitHub
This is covered in more detail at https://practical.li/spacemacs/source-control/magit/forge/ along with https://practical.li/spacemacs/source-control/git-configuration/ and https://practical.li/spacemacs/source-control/forge-configuration/ setup#2023-07-1402:18Jason BullersI wanted to give Spacemacs a try as a VSCode Calva user, just to see how things compare. I've heard good things, and like that the spacebar seems to guide you through commands instead of having to remember wild finger contortions (I don't think my brain can handle a third editor's key bindings). Anyway, I installed emacs, git cloned .emacs.d and started it all up for the first time. It asked me a couple questions: I chose evil and spacemacs default. It downloaded a bunch of packages and then:
Error (use-package): Cannot load evil-evilified-state
Warning (initialization): An error occurred while loading '/home/me/.emacs.d/init.el':
Symbol's value as variable is void: evil-evilified-state-map
That's not even a file I wrote, so what's going on there?#2023-07-1406:52practicalli-johnnyA restart of Emacs is recommended after downloading a bunch of packages to ensure all packages are compiled correctly (and as a fallback check that all packages were successfully downloaded)#2023-07-1406:56practicalli-johnnyhttps://practical.li/spacemacs/install-spacemacs/troubleshooting/ provides troubleshooting advice#2023-07-1520:31Jason BullersThanks, tried restarting, but no luck. I'll check out the troubleshooting steps when I've got a chance. Hopefully it's an easy fix#2023-07-2720:00erwinrooijakkersMy Spacemacs became very very slow yesterday⦠I changed nothing (same version of Emacs same version of Spacemacs) but now it freezes a lot. I reinstalled ~/.emacs.d but problem persistsā¦#2023-07-2800:11practicalli-johnnyThe only issue I am aware of is a possible conflict when using Clojure-lsp and Clojure-mode (CIDER), specifically when moving the cursor inside/at the start of a comment form#2023-07-2800:13practicalli-johnnyThere could also be other conflicting aspects of ClojureLSP and CIDER, especially if both are trying to format the Clojure code#2023-07-2818:07erwinrooijakkersthanks @U05254DQM. in my case it was related to a growing savehist file as pointed out by jahson⦠See https://github.com/syl20bnr/spacemacs/issues/9409#2023-07-2819:02practicalli-johnnyThanks for the update. It seems useful to add some limits on the save history file sizes.
I've created an issue to update the practicallii/spacemacs-config with the suggested limits
https://github.com/practicalli/spacemacs-config/issues/9#2023-07-2720:02erwinrooijakkersI could try profiling I guess first, but just no idea where to start#2023-07-2720:02erwinrooijakkersOther applications work fine#2023-07-2720:06erwinrooijakkersprofiler-start and then hopping around doing text operations in an initially empty text file till screen freezes, when it unfreezes profiler-stop and then profiler-reportgives this output⦠(no idea what command-execute is and clicking on it does nothing)#2023-07-2720:09erwinrooijakkersI do see this log message:
2023-07-27 22:01:59.624 Emacs-x86_64-10_14[59952:507496] It's not legal to call -layoutSubtreeIfNeeded on a view which is already being laid out. If you are implementing the view's -layout method, you can call -[super layout] instead. Break on void _NSDetectedLayoutRecursion(void) to debug. This will be logged only once. This may break in the future.
#2023-07-2720:10erwinrooijakkersbut that was there earlier as well when it did not freeze#2023-07-2720:10erwinrooijakkershopefully anybody can give me some pointers because I have no idea#2023-07-2720:10erwinrooijakkersmight just reinstall emacs otherwise#2023-07-2800:09practicalli-johnnyUnless there is some specific action that causes the freeze, then I'd suggest it's the distribution of Emacs being used (there can quite a few Emacs versions and distributions depending on OS), or native compilation (due to OS library changes)
https://practical.li/spacemacs/install-spacemacs/pre-install/#install-emacs
Emacs 28 is probably the most reliable, although I've used 29 and 30 without freezing on Linux, both later versions built from source#2023-07-2808:25erwinrooijakkersthanks, I used https://emacsformacosx.com/#2023-07-2808:26erwinrooijakkersand run via ec <file name> with
alias emacsclient="/Applications/Emacs.app/Contents/MacOS/bin/emacsclient -c -a '/Applications/Emacs.app/Contents/MacOS/Emacs'"
alias ec='emacsclient'
#2023-07-2808:27erwinrooijakkersI will reinstall and see#2023-07-2816:40jahsonI kinda recall some issues with emacsformacosx. Over the time Iāve migrated to emacs-plus@29 installed via homebrew.#2023-07-2817:25erwinrooijakkersyes I actually installed that one, thanks#2023-07-2817:26erwinrooijakkersunfortunately after starting spacemacs again the problem comes again#2023-07-2817:27erwinrooijakkersaround 100% CPU and freezes#2023-07-2817:30jahsonMaybe something related? https://github.com/syl20bnr/spacemacs/issues/9409#issuecomment-1084039955#2023-07-2817:31erwinrooijakkersitās 240 MB in my case#2023-07-2817:33jahsonDoes issue persists if you use clean .spacemacs config?#2023-07-2817:35erwinrooijakkersdonāt know I could check later, but in the issue you linked someone says this:
> āIn my case my savehist ballooned to 1.6GB from 80kB as PNG data somehow got into the kill ring while editing an org file:ā#2023-07-2817:35erwinrooijakkersmy issues also popped up during working in an org file#2023-07-2817:36erwinrooijakkersafter removing the ~/.emacs.d/.cache/savehist the issue is gone#2023-07-2817:39erwinrooijakkersthanks a lot for the suggestions @U071CG4QY this issue was very related š not sure yet why savehist blows up, but at least this is a way to make it fast again#2023-07-2817:48erwinrooijakkersThe reason why a clean install did not work is that I did not remove the savehist file before. I executed rm -rf * in ~/.emacs.d/, but this does not remove the hidden files like savehist.
I do suspect the savehist file growing is related to me editing a large org file, since I first noticed in an org file and the other user in the issue reports the same, but not sure.
Anyway, thanks a lot all š#2023-07-3117:34Drew VerleeHow would i trouble shoot why my dotspacemacs/user-config isn't being run when i start emacs? I have to run that function manually.#2023-07-3117:43practicalli-johnnyIf using a .spacemacs.d/init config, check to see if there is a .spacemacs file in the root of the user directory and remove it (it takes precedence)#2023-07-3117:43practicalli-johnnyOtherwise I would assume some parens wrangling is required in the Spacemacs user config#2023-07-3117:44practicalli-johnnyOr something very weird is happening: š»#2023-07-3117:49Drew VerleeHow do you check for parens issues? (Other than manually binary search)#2023-07-3117:56practicalli-johnnyIn evil Normal mode I use % with the cursor on the opening paren and it should jump to the closing paren (if it exists). Should show if things got nested.#2023-07-3117:57practicalli-johnnyI assume there is something in Lisp state that does the same, something in the SPC k menu#2023-07-3117:59practicalli-johnnycheck-parens command apparently checks parents too
https://www.emacswiki.org/emacs/DebuggingParentheses#:~:text=Unbalanced%20parentheses%20will%20cause%20errors,have%20reached%20the%20problematic%20spot.#2023-07-3118:48Drew VerleeThanks!
no parens issues came up. Evaling everything in the user-config runs fine. No .spacemacs in the root of the user directory. :thinking_face:#2023-07-3118:57practicalli-johnnySPC f e D to compare your Spacemacs user config with the Spacemacs template config ?#2023-07-3119:00practicalli-johnnyOr move your existing user config to a backup directory, restart Emacs and it will create a new .spacemacs config. Then add specific expressions to the dotspacemacs/user-config section, optionally using , e e to check the added expressions work#2023-07-3119:04practicalli-johnnyOr backup your existing config and see if the Practicalli config loads (should show a Practicalli logo on the home buffer, SPC b h https://github.com/practicalli/spacemacs-config/#2023-08-0102:23Drew VerleeThanks, I'm going to these ideas first thing tomorrow. I really appreciate your help John. It goes a long way to making the whole business more enjoyable knowing there are people who care.#2023-08-0315:00euccastroI'm getting this error: https://github.com/doomemacs/doomemacs/issues/6600 (yes, I know that is a doomemacs issue, but bear with me; I promise I'm not trolling) in latest develop spacemacs. I'd like to try the workaround/fix (install fd 8.3 or newer). Where do I find this in my .emacs.d?#2023-08-0316:39practicalli-johnnyfd is an external tool to Emacs, so won't be found in the Emacs config. On UNIX / Linux systems it is often in /usr/bin . which fd command should show its location if needed
I haven't checked versions available, but generally fd install instructions are documented at
https://github.com/sharkdp/fd#installation#2023-08-0316:39practicalli-johnnyThe page also shows what version is available for each operating system#2023-08-0315:04euccastroha, sorry for the noise; I see fd (fdfind in my machine) is a linux command, not an emacs package#2023-08-1002:51FlavaDaveJust updated packages and got latest on develop branch and treemacs wont work. I looked up the behavior online and the behavior I am seeing matches this https://github.com/Alexander-Miller/treemacs/issues/182 that has been fixed for a long time. Has anyone been having similar issues?#2023-08-1006:24practicalli-johnnyNope, haven't had any issues with Treemacs recently but will update packages and test.
As follow-mode is set by Spacemacs Treemacs layer as the default, I've always used SPC f t or mainly SPC p t to open a project (supports multiple projects)#2023-08-1007:04practicalli-johnnyUpdated to latest packages, SPC f e U , and I am experiencing an issue. SPC p t is not showing any items in the buffer it opens and the following error is displayed
Symbolās value as variable is void: treemacs
Error in post-command-hook (treemacs--post-comman\
d): (wrong-type-argument number-or-marker-p nil)
#2023-08-1007:29practicalli-johnnyAs a quick fix I reverted to treemacs-20230703.1929 package which seems to work okay in some brief tests#2023-08-1007:37practicalli-johnnyI moved the existing package to a backup location
mv ~/.emacs.d/elpa/28.3/develop/treemacs-20230809.2040/ ~/backup/emacs-packages/
Then copy an earlier package from the rollback directory
cp -r ~/.emacs.d/.cache/.rollback/28.3/develop/23-08-10_07.35.07/treemacs-20230703.1929/ ~/.emacs.d/elpa/28.3/develop/
Adjust the location of the root Spacemacs directory where necessary
Or use the "Rollback Package Update" link on the Spacemacs home buffer, SPC b h , to go back to the previous set of packages (rolls back all updated packages)#2023-08-1007:46practicalli-johnnyIdeally a working version of the Treemacs package should be pinned in the Spacemacs user config, as described in https://github.com/practicalli/spacemacs/issues/293#2023-08-1007:56practicalli-johnnySomething like this should work to pin treemacs
(treemacs
:location (recipe
:fetcher github
:repo ""
:commit "))#2023-08-1017:16FlavaDaveI did that and turned off native comp. Treemacs works but I use your spacemacs config and that wont load anymore#2023-08-1018:47practicalli-johnnyThe Practicalli Spacemacs-config is not contingent on native compilation, It is contingent on not having a .spacemacs file in the root of the users directory
How was native compilation turned off? I thought it was only an option when building emacs. I am not clear how that would be related to either issue.
The original issue mentioned is 5 years old and closed, so I assume there is either a change to the treemacs package API or an unintentional bug introduced in the last month.
If there are no errors generated as to why the Practicalli Spacemacs-config is not loading, then I can only suggest looking at the troubleshooting guide
https://practical.li/spacemacs/install-spacemacs/troubleshooting/#2023-08-1018:48FlavaDavesorry I responded with incomplete information#2023-08-1018:49FlavaDaveI got treemacs to work with your snippet. But then my .spacemacs.d confic wasn't completely loading and still isn't#2023-08-1018:50FlavaDaveI am now getting a lot of errors about org-mode versions#2023-08-1018:52FlavaDaveI'll check out that troubleshooting guide#2023-08-1018:54FlavaDave> How was native compilation turned off?
no-native-compile t#2023-08-1121:30practicalli-johnnyAfter looking at the Melpa recipe for the treemacs package, I used the following recipe in Spacemacs configuration dotspacemacs-additional-packages
and comment the (treemacs ,,,) layer configuration in dotspacemacs-configuration-layers
dotspacemacs-additional-packages
'((treemacs
:location (recipe
:fetcher github
:repo "Alexander-Miller/treemacs"
:commit "2c576bebccd56ec8e65f4ec5ed5de864d9684fbf"
:files (:defaults
""
"icons"
"src/elisp/treemacs*.el"
"src/scripts/treemacs*.py"
(:exclude "src/extra/*")))))
The current issue has been raised as an issue on the treemacs GitHub repository https://github.com/Alexander-Miller/treemacs/issues/1048#2023-08-1216:15FlavaDaveThanks @U05254DQM !#2023-08-1121:50practicalli-johnnyTreemacs issue - not showing files and directories in recent 202308 package
Issue may be limited to Emacs + native compilation + Doom modeline (Doom modeline is configured in practicalli/spacemacs-config).
If this could affect you, then suggest not update Emacs packages unless there is a new version of other packages that is required.
If a package update is required, then either
⢠before a package update, add a recipe for treemacs to dotspacemacs-additional-packages in the Spacemacs configuration file, SPC f e d
dotspacemacs-additional-packages
'((treemacs
:location (recipe
:fetcher github
:repo "Alexander-Miller/treemacs"
:commit "2c576bebccd56ec8e65f4ec5ed5de864d9684fbf"
:files (:defaults
""
"icons"
"src/elisp/treemacs*.el"
"src/scripts/treemacs*.py"
(:exclude "src/extra/*")))))
⢠Or after a package update, replace the elpa/<emacs-version>/develop/treemacs-20230809.2040 with an older package from .cache/.rollback/<emacs-version>/develop/<rollback-date>/treemacs-*` - package version treemacs-20230703 is working.#2023-08-1421:11practicalli-johnnyThe upstream Treemacs package has been updated to resolve the issue of missing information.
I'll test this myself in the morning#2023-08-1215:41murtaza52Hi, just updated all packages in spacemacs and now when spacemacs starts I get this error -
Symbols value as variable is void - fun-name
this leads to an initialization error, and all of emacs is unusable.#2023-08-1219:47practicalli-johnnyIf the issue still occurs after the packages downloaded and Emacs was restarted, then it seems likely that there is an issue with one of the packages
The quick approach would be to use the rollback packages link on the home buffer, SPC b h#2023-08-1219:50practicalli-johnnyFrom the other error output, it seems that window-purpose package is the problem.
Normally I would suggest removing tha package and restart Emacs to download the package again. But as a clean install was done already then I doubt this would resolve the issue.#2023-08-1219:55practicalli-johnnyIf code has been added to the user config to define where windows should be placed, then try comment that code and restart (helps determine if package config has changed)#2023-08-1220:02practicalli-johnnyOr as window-purpose is not a default package, comment the layer in the Spacemacs user configuration
Maybe some info in the window-purpose layer docs will help with the correct config
https://develop.spacemacs.org/layers/+spacemacs/spacemacs-purpose/README.html#2023-08-1306:27murtaza52thanks for the reply.
I am using practicalli spacemacs.d config, and have not modified anything.
I greped the repo for window-purpose, and found it inside the emacs-custom-settings.el#2023-08-1307:49practicalli-johnnyThe emacs-custom-settings.el contains configuration set by the Emacs customize command. Emacs may write other config info there when using Emacs.
practicalli/spacemacs-config doe not include this file in the repository. The file is used by the Practicalli config to cache some user specific config once Emacs is run, e.g safe variables, layouts, options set by customize
Suggest stopping Emacs and moving emacs-custom-settings.el to a backup location.#2023-08-1312:54practicalli-johnnyAfter some further investigation, it seems several other layers include the window-purpose package
layers/+tools/shell/packages.el:380:(defun shell/post-init-window-purpose ()
layers/+lang/python/packages.el:524:(defun python/post-init-window-purpose ()
layers/+email/mu4e/packages.el:191:(defun mu4e/post-init-window-purpose ()
layers/+email/gnus/packages.el:145:(defun gnus/post-init-window-purpose ()
layers/+chat/erc/packages.el:260:(defun erc/post-init-window-purpose ()
layers/+chat/jabber/packages.el:55:(defun jabber/post-init-window-purpose ()
layers/+chat/slack/packages.el:104:(defun slack/post-init-window-purpose ()
layers/+chat/rcirc/packages.el:191:(defun rcirc/post-init-window-purpose ()
layers/+email/notmuch/packages.el:175:(defun notmuch/post-init-window-purpose ()
The practicalli config does include the shell layer, so if there was a change in the window-purpose package that may be causing the issue, although looking in the Spacemacs elpa directory the latest package is window-purpose-20210628.715 so it seems it hasnt changed in several years.#2023-08-1312:59practicalli-johnnyI am not able to replicate the issue when updating the packages today.
If backing up and moviing the emacs-custom-settings.el file does not resolve the issue, then perhaps something in the general troubleshooting guide will help.
https://practical.li/spacemacs/install-spacemacs/troubleshooting/#2023-08-1405:53murtaza52thanks, its working now#2023-08-1219:32murtaza52the error has again started after a clean install of spacemacs -
ā Error (use-package): window-purpose/:config: Symbol's value as variable is void: fun-name
ā Error (use-package): winum/:catch: Symbol's value as variable is void: fun-name
ā Error (use-package): ws-butler/:catch: Symbol's value as variable is void: fun-name
ā Error (use-package): xterm-color/:catch: Symbol's value as variable is void: fun-name
ā Warning (initialization): An error occurred while loading '/home/murtaza/.emacs.d/init.el':
Symbol's value as variable is void: fun-name
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the '--debug-init' option to view a complete error backtrace.
#2023-08-1323:29didibusI get that as well. Seems 29.1 has broke my Spacemacs#2023-08-1405:53murtaza52reinstalled spacemacs twice, and its working now. Second time I installed spacemacs again after removing the emacs-custom-settings.el file as suggested by @U05254DQM, maybe that did the trick.#2023-08-1422:34didibusI'll have to try#2023-08-1507:21practicalli-johnnyThere was an issue in the Evil package which has now been resolved.
https://github.com/emacs-evil/evil/issues/1820
If this issue persists after a package update then try removing the evil package from the local Spacemacs elpa directory and restart Emacs to download the fixed package#2023-08-1414:49BlackSo, after spacemacs update when in project I try to open project in file tree (treemacs) buffer is empty and in messages buffer is this message:
Error in post-command-hook (treemacs--post-command): (wrong-type-argument number-or-marker-p nil)
How should I debug it? Can't find treemacs--post-command anywhere in .emacs.d or .spacemacs.d#2023-08-1421:09practicalli-johnnyThe treemacs package has been fixed upstream, s a new package update should resolve he issue (however I haven't tested this myself as yet).
Otherwise, rollback the packages or pin an earlier version as mentioned in the previous thread#2023-08-1414:51eggsyntaxSee above for the fix for treemacs:
https://clojurians.slack.com/archives/C09C8GRLY/p1691790625910439#2023-08-1507:46practicalli-johnnyEmacs Package bugs summary this month
- all known issues should be resolved now
⢠Treemacs - not displaying directory tree if using doom modeling theme (https://github.com/Alexander-Miller/treemacs/pull/1044)
⢠Evil - breaks Spacemacs startup (https://github.com/emacs-evil/evil/issues/1820)
⢠Cider - connect issues (https://github.com/clojure-emacs/cider/commit/e0436e564db6571cbfa3c06e5ae079069021258d)#2023-09-0409:16BlackIs there a way to sort map as you can sort namespace , r s n ? I tryied to define macro which uses vim :sort but it is not reliable a<return><escape>k%i<return><escape>l%jVk%k:sort<return>[Jh%kJ , also this will only sort maps where each line is simple :key :value#2023-09-0411:34jahsonIf you have LSP then you can use , a a, sort.#2023-09-0411:35jahsonNot sure if it can be bound to some key combination.#2023-09-0415:54practicalli-johnnyPerhaps sort-line Emacs command may work, assuming each key/value pair is on its own line.#2023-09-0419:37BlackSure, when key/pair is on each line I can make it work, it would be nice to have some more robust solution. Yet to explore @U071CG4QY Ā“s solution.#2023-09-0511:28Black@U071CG4QY's solution works perfectly! thanks#2023-09-0715:15jcdI recently upgraded to 29.1 and itās made Spacemacs pretty unstable when using cider: I think completion is hanging, but itās not getting to a point where debug on error is actually catching it. Anyone had this issue and have a fix? #2023-09-0715:16jcdOr maybe itās magit hanging when I change branches? Let me see if I can reproduce. #2023-09-0715:25jcdAh disabling LSP linting seemed to make things snappy again. Iāll start with that and see if I can make LSP linting performant. #2023-09-0717:25jcdItās actually looking like the LSP itself just bogs down after running a bit. #2023-09-0813:31practicalli-johnnyI find completion slow when typing so have increased the delay quite significantly using lsp-idle-delay 1.5 as an lsp layer variable, e.g.
(lsp :variables
lsp-headerline-breadcrumb-enable t ; Breadcrumb trail
lsp-headerline-breadcrumb-segments '(symbols) ; namespace & symbols, no file path
lsp-ui-peek-enable nil ; popups for refs, errors, symbols, etc.
lsp-semantic-tokens-enable t ; enhance syntax highlight
lsp-treemacs-error-list-current-project-only t ; limit errors to current project
lsp-idle-delay 1.5 ; smooth LSP features response
lsp-eldoc-enable-hover nil ; disable all hover actions
lsp-ui-doc-enable nil ; doc hover popups
lsp-ui-sideline-enable nil ; sidebar code actions visual indicator
treemacs-space-between-root-nodes nil ; spacing in treemacs views
lsp-log-io t ; Log client-server json communication
)
This is on Emacs 30 built from source a few weeks ago, so should be a similar experience in Emacs 29
I've only recently increased this value, so not sure if it has other consequences, but it seems to help typing speed.#2023-09-0813:35jcdIāll try that. I like certain features of LSP but it seems to be grinding gears against cider. I still havenāt found a smoking gun for whatās causing things but Iāve had to hard kill eMacs quite a lot in the last few days. #2023-09-0814:02practicalli-johnnyYou could also try adding the following to dotspacemacs/user-config section of the spacemacs user configuration file
(setq gc-cons-threshold (* 100 1024 1024)
read-process-output-max (* 1024 1024)
From the suggested config at https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/#basic-configuration
Spacemacs already sets a large number for gc-cons-threshold though...#2023-09-0814:03jcdThanks! Iāll give both of those a shot. #2023-09-0914:44jcdClosing the loop on this one: I upped the idle time, and that improved things significantly. I also removed the syntax checking layer about an hour later; performance is stable and no lockups since those changes. #2023-09-0917:32practicalli-johnnyThanks. I have the same too and all seems well.#2023-09-1208:35Ho0manHi everyone,
I just recently reinstalled spacemacs ( emacs 29.1 and latest spacemacs and practicalli spacemacs configs) but the d s, c s commands for deleting and changing wrapping parens no longer works giving the error no surrounding delimiters found. What's wrong? I tried reinstalling emacs, spacemacs, practically config. Any help is appreciated.
Thanks a lot#2023-09-1208:53practicalli-johnnyUpdate: issue raised at: https://github.com/syl20bnr/spacemacs/issues/16144
I can reproduce this issue too, unfortunately. I suspect something has changed in which ever evil package includes evil-motion-range
Are you able to do a package rollback?
If it is a package, perhaps pinning an earlier version will fix it.
I dont think its related to the Practicalli config, the only thing changed recently was commenting the syntax-checker layer (flyspell) and a tweak to the LSP idle delay. You could try enable the syntax-checker layer, but I would be surprised if its the cause (although an easy fix)
Will see if I can find more details by looking for the right emacs package and similar issues.#2023-09-1208:58Ho0manThanks a lot, John
will try both now#2023-09-1208:58practicalli-johnnyIts the layer... adding it back in seems to work. I'll push an update to the Practicalli spacemacs-config repo in a minute.#2023-09-1209:02practicalli-johnnyI've updated Practicalli Spacemacs-config repo to add the syntax-checker layer back in and the d s and c s commands work again. It seems LSP doesnt cover everything š#2023-09-1209:07Ho0manThanks again, John
But I seem to be still getting the surround error. I've enabled clj-kondo and cider on the clojure layer btw could this also be related?
Should I delete any files or folders ?
This is the warning after switching to the new config - (i dunno if its related though) :
ā Warning (emacs): 'syntax-checking-use-original-bitmaps' is deprecated. Use 'syntax-checking-indication-symbol' instead.
ā Warning (comp): /home/ho0man/.emacs.d/elpa/29.1/develop/helm-cider-20220706.944/helm-cider-spec.el: Error: Symbol's function definition is void helm-make-actions
And these are the evil-motion logs in the *Messages* buffer :
46 evil-motion-range: No surrounding delimiters found [2 times]
55 evil-motion-range: Wrong type argument: characterp, 67108873
56 evil-motion-range: No surrounding delimiters found
57 evil-motion-range: No surrounding delimiters found
#2023-09-1209:48practicalli-johnnyI restart emacs after installing packages to ensure everything is loaded correctly.
I also get the 'syntax-checking-use-original-bitmaps' warning, but ds and cs are working.#2023-09-1209:51practicalli-johnnyAlthough I have done a package update and they now seemed to have stopped working... so maybe there is also a package change...#2023-09-1210:03practicalli-johnnyThere have been some changes in the https://github.com/emacs-evil/evil-surround/ package in the last 3-4 weeks, so an issue could have been introduced there, or perhaps within the evil/evil package which evil/surround uses...
If you have a rollback from several weeks ago, then that may be the quickest fix...#2023-09-1210:31practicalli-johnnyWith the following Emacs packages, then cs and ds work
⢠evil-surround-20230627.2052
⢠evil-20230813.73720
So there seems to be a change after that fails to work, not sure exactly where or in which package as it seems the evil-cleverparens commands are being called, i.e. evil-cp-change . My guess is something has changed in evil-surround or evil that causes evil-cp-change to break.#2023-09-1210:38practicalli-johnnyevil-surround-20230813.2053 includes the broken functionality, so sometime between 2023-06-27 and 2023-08-13 it seems#2023-09-1211:21practicalli-johnny@U6CE37RK6
The following recipe seems to work, pinning evil-surround to a working version. Currently testing with all updated packages. UPDATE: it works š„³
The existing elpa/<emacs-version>/develop/evil-surround-... directory should be removed (or moved) first, then the evil-surround package will be pinned to the SHA version in the recipe below.
dotspacemacs-additional-packages '(
(evil-surround
:location
(recipe :fetcher github
:repo "emacs-evil/evil-surround"
:commit "f273821f575ace519066fb106ee45a5b8577475f")))#2023-09-1307:33Ho0manThanks a lot, John#2023-09-1307:33Ho0manI really appreciate your help#2023-09-1211:35practicalli-johnnyhttps://github.com/syl20bnr/spacemacs/issues/16144: c s / d s evil change / delete surrounding parens (delimiters) commands are broken in evil-surround package on or after 27th August 2023.
Add the following recipe to your Spacemacs user config, SPC f e d, if using this evil functionality and needing to carry out a package update in Spacemacs (remove the evil-surround package from elpa/<emacs-version>/develop directory if already updated after 27th August 2023 and restart to download the working package version)
dotspacemacs-additional-packages '((evil-surround
:location
(recipe :fetcher github
:repo "emacs-evil/evil-surround"
:commit "f273821f575ace519066fb106ee45a5b8577475f")))
UPDATE: a fix has been pushed to evil-surround and it seems to be working in my tests. Melpa should build a new package for download in about 2 hours from now.
If you wish to test before, update the recipe to use the latest commit
(evil-surround
:location
(recipe :fetcher github
:repo "emacs-evil/evil-surround"
:commit "0d860be74165ceb8314742e4191cdad693f40a6d"))#2023-09-1211:45tomdš
those will be changes I made/merged. Apologies for the breakage. Iāll take a look as soon as I can. This is a downside of taking on a package with no automated testing and then making changes. Should be able to report back soon#2023-09-1211:48practicalli-johnnySoftware archaeology is certainly "interesting"... wishing you the best of luck with this new package.
Happy to do some more testing if required.#2023-09-1211:49tomdš Thanks very much! Yes I may ask you to give it a check once I think Iāve fixed it š#2023-09-1218:36practicalli-johnnyAll looks good to me. Thank you.#2023-09-1218:44tomdAh, pleased to hear it#2023-09-1813:15murtaza52I get these msgs in the lsp-log when I browse to a json file and spacemacs tries to install a server -
Command "semgrep lsp" is not present on the path.
Unable to install vscode-langservers-extracted via `npm' because it is not present
#2023-09-1815:11practicalli-johnnyLsp-mode will prompt for an LSP server for the current major mode if it cannot find the server binary on the system path.
The vscode-langservers are all (or at least mostly) installed via npm, so if Emacs doest find npm on the operating system path then it can't install the LSP server binary#2023-09-1815:16practicalli-johnnyBasic details are in the json layer docs.
If LSP is not desirable, try setting the backend to nil ( not sure if that works, but it may disable LSP and not try download the server)
Otherwise install nodejs/npm and install the JSON LSP server binary or let the json majore mode trigger lsp to download the npm package
https://develop.spacemacs.org/layers/+lang/json/README.html#2023-09-2014:55murtaza52npm is on the path
I am using nvm so that puts it on the path.
not sure why emacs is not able to find it.#2023-09-2017:11practicalli-johnnySPC f e e should open the spacemacs.env file that is computed when running Emacs and contains the PATH and other useful environment settings that Emacs uses. I would check if npm is on the path that is in the spacemacs.env file
It could also be an incompatible version of npm/node. I think I am running version 18
The lsp server for json could be installed by yourself instead of letting emacs try and install it. If Emacs finds the lsp server, then it will not try and install it.#2023-09-2015:09murtaza52I reinstalled emacs/spacemacs recently. I am using the practicalli config.
I am unable to eval expressions in the buffer directly. , e v does not return anything.
If I go to the repl and write an expression it evals it. How do I get eval in buffer again ?#2023-09-2017:06practicalli-johnnySounds like Emacs was not restarted after installing all the packages, or maybe is still compiling packages natively if that feature is enabled.
Otherwise something is very broken and I dont know how to reproduce.#2023-09-2017:08practicalli-johnnyAre all the key bindings showing?
Does , e f evaluate the top level form ?#2023-09-2017:20practicalli-johnnyI updated Emacs packages on the 12th September and I can use , e v to evaluate a complete form successfully once the REPL has started.
Ensure that CIDER has loaded Clojure after starting the REPL by evaluating either an ns form or a whole buffer that contains an ns form.
I'm using cider package cider-20230912.1201 so I guess something could have broken since then.
Can you report what version of Cider is running, e.g. SPC SPC cider-version in Emacs.#2023-09-2111:25murtaza52This is the cider version - CIDER 1.8.0-snapshot (package: #2023-09-2111:26murtaza52nope cant eval any forms in the buffer#2023-09-2111:43practicalli-johnnyVery strange indeed.
According to MELPA you have the latest Cider package.
I will update my Emacs packages and see if I can reproduce#2023-09-2112:57practicalli-johnnyI've updated the CIDER package to the same version as you have and evaluation in the source code buffer is working. So it seems unlikely it a package or config issue.
I suggest tying a different Clojure project or creating a very simple project.
If the Emacs message buffer, SPC b m , isn't showing errors, then I don't have specific advice, other than the general trouble shooting guide
Perhaps start by deleting the Cider package and restart Emacs to download the package again (it may have been a bad download).
https://practical.li/spacemacs/install-spacemacs/troubleshooting/#2023-09-2113:54practicalli-johnnyCan you also confirm that the Clojure source code buffer is in Clojure mode?
SPC SPC clojure-mode will toggle Clojure mode on and off.
If the Clojure buffer is not in Clojure-mode, then it would explain why the eval commands are not working (but then none of the cider or clojure-mode keybindings would show either#2023-10-0907:40murtaza52hi @U05254DQM thanks for the help.
I deleted the elpa dir and reinstalled, same result.
When I try to do , s n it gives me this error - save-current-buffer: Wrong type argument: stringp, nil
SPC SPC clojurescript-mode connects it back, without any errrors, but it still doesnt work.#2023-10-0907:57murtaza52However I am able to do in-ns and then eval forms in the repl. But I dont get any completions in the repl, I have to type the forms.#2023-10-0908:56practicalli-johnnyI don't have a key binding for , s n
I assume you using , s N to sent namespace to repl and focus. This command works on my machine.
Can you send me the command used to start the REPL. If using jack-in, the command will be added to the *messages* buffer, spc b m
Perhaps the middleware is not being included correctly#2023-10-0909:22murtaza52I am using cider-connect-cljs. Its a cljs / shadow-cljs app.#2023-10-0909:23murtaza52cider-connect-cljs -> localhost -> balance:8230 -> :app#2023-10-0909:23murtaza52above are the choices that I select and then the repl connects.#2023-10-0909:24murtaza52balance:8230 is the app that I am working on, and :app is the shadow-cljs target#2023-10-0909:31murtaza52I have a default keybinding for , s n - cider-send-ns-form-to-repl
on , s N I get the following msg -
user-error: No cljs REPLs in current session "tallyfor/balance:localhost:8230"
#2023-10-0910:15practicalli-johnnyI can replicate the issue in clojurescript-mode, but not in clojure-mode
I suspect this is a bug in Cider as there have been some recent changes there...#2023-10-0911:00practicalli-johnnyCorrection, I replicated the issue as I didnt start the clojurescript repl using jack-in, I stared a Clojure REPL instead.
When I used cider-jack-in-cljs then I can evaluate in the buffer.
I suspect that when evaluating in the clojurescript-mode buffer it is looking for a clojurescript-repl which Cider is not connected too (or not running)#2023-10-0911:04practicalli-johnnyI havent used shadow-cljs very much at all. I'd suggest going through the very specific shadow-cljs guide which precisely details how to setup and run the project. From comments I have seen, there is a specific way to make shadow-cljs work with Emacs, which should be covered by reading the detailed guide
https://shadow-cljs.github.io/docs/UsersGuide.html
People in the #C0617A8PQ channel may also have some advice about using Emacs with shadow-cljs, but I am afraid I have no experiences to share currently.#2023-10-0914:13murtaza52thanks for investigating it, let me check out the guide.#2023-10-3015:06jumarDoes anybody have a special user for AWS CloudFormation in spacemacs apart from basic yaml syntax support?
I'm looking at https://github.com/aws-cloudformation/cfn-lint at the moment...#2023-10-3015:07jumarautocomplete would be ideal š#2023-10-3015:24practicalli-johnnyThere is some example code that wires the linter uoto flywheel that could be added to your Spacemacs user config, in dotspacemacs/user-config section
https://www.emacswiki.org/emacs/CfnLint#2023-11-1222:38Drew VerleeHow would you go about diagnosing why hitting tab doesn't cycle through automcomplete options in a clj file? E.g if my cursor is * then hitting tab here
re*
Should show me "reduce"#2023-11-1222:40Drew Verleethe emacs function 'completion-at-point' seems to find the completions, but tab doesn't load them up.#2023-11-1222:56Drew Verleei went back to the default layer configuration for aut-completion and now it's working ok....#2023-11-1223:18Drew Verleewell it's not working on library functions e.g (semantic-csv.core/cast*)#2023-12-2717:53Mario C.Does anyone know what theme is used here? https://github.com/djblue/portal/blob/master/doc/editors/emacs.md
Or a theme that closely matches this color scheme?#2023-12-2718:38practicalli-johnnySPC T s in Spacemacs will allow you to scroll through the list if themes and see what they look like#2023-12-2718:42practicalli-johnnyAs the page mentioned is markdown text and not an Emacs screenshot, then you could try search for the theme used by GitHub for code blocks#2023-12-2718:43Mario C.Yes it looks like they are using PrettyLights so I wasn't looking at a theme after all š
#2023-12-2720:45Jason BullersI guess you meant the page and not the portal screenshot on that page?
The screenshot looks like Nord#2023-12-2817:30Mario C.No, I actually was referring to the screen shot, I like the theme but it was not a screen shot, just markup with syntax highlighting. But I like the nord theme too#2024-01-1113:26jumarAfter a recent update, expand-region doesn't seem to work for me anymore.
Instead of selecting the proper form (e.g. a function when I put cursor at the opening paren)
it simply selects the whole buffer.
Anybody knows what might be causing this problem and if it can be fixed?#2024-01-1120:44practicalli-johnnyI havent updated yet, but my assumption would be its one of the https://github.com/magnars/expand-region.el/commits/master/that has caused a change that Spacemacs config isnt aware of.
https://github.com/magnars/expand-region.el/commits/master/
If its not obvious from any of the changes as to what happened, I suggest raising an issue on the Spacemacs org, SPC h I and hopefully it will be resolved pretty quickly.#2024-01-1120:27Reut SharabaniI have a new laptop and lsp seems to crash after I format code (gg=G). Anyone ran into it?
If I restart the lsp server it works fine but crashes immediately after next format.
I only see a message ("Internal error") and I don't know how to debug it (tried checking "messages" and both repl windows)#2024-01-1120:28Reut SharabaniAlso checked lsp buffers but there is nothing there#2024-01-1120:59practicalli-johnnyThere could be issues if trying to index an extremely large project, but otherwise this seems strange.
There is a Clojure LSP troubleshooting guide
https://clojure-lsp.io/troubleshooting/
Check the basics like version number, e.g. , b v or SPC SPC lsp-clojure-server-info to see if you have the latest version of LSP downloaded to help rule that out as the cause. Spacemacs should download the latest version when opening a file if it wasnt downloaded and installed by yourself. Check there isnt an older version being picked up (although as this is a new laptop that shouldnt be the case)
If its Clojure LSP server that is specifically crashing, more guidance should be available in #lsp channel#2024-01-1121:05Reut SharabaniVersion was good, didn't check the other stuff (moved back to cider)#2024-01-2501:47David GIs anyone using the lsp backend for clojure? I just re-enabled it after a couple of years and clojure-align can take quite a bit of time for large maps. Does anyone know if there's a way to remedy this (aside from going back to the cider backend)?#2024-01-2514:18practicalli-johnnyMaybe #lsp has suggestion.
Probably not an Emacs issue unless you have other format tools trying to work at the same thing me as LSP. But I assume the slowness would happen more often if that were the case#2024-02-0520:07jumarI'm getting this error when installing spacemacs on a new macbook.
Using Emacs 29.2 https://emacsformacosx.com/
ā Error (use-package): Cannot load evil-evilified-state
ā Warning (initialization): An error occurred while loading '/Users/jumar/.emacs.d/init.el':
Symbol's value as variable is void: evil-evilified-state-map
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the '--debug-init' option to view a complete error backtrace.
This is after using the spacemacs installation instructions - using the master branch.
Anything I'm doing wrong?#2024-02-0520:47practicalli-johnnyThe default branch is develop and has been for several years now. Unless explicitly cloning the master branch, then it should be develop you are using.
If the master branch was specifically cloned (or checked out) then I would expect quite a few things to break once packages were downloaded (as many packages have changed)#2024-02-0520:50practicalli-johnnyIf the zip file of spacemacs config was downloaded from http://spacemacs.org that does contain master branch from about 2 years ago. So I would consider that option unsupported.#2024-02-0520:52practicalli-johnnyThe clone command on the http://spacemacs.org website will download the develop branch
git clone ~/.emacs.d
#2024-02-0520:55practicalli-johnnyThe spacemacs install instructions on Practicalli Spacemacs should be up to date, (september 2023 last updated) and they cover XDG and standard config locations, as well as how to use the Practicalli Spacemacs user config
https://practical.li/spacemacs/install-spacemacs/#2024-02-0520:56practicalli-johnnyI think the error posted at the start of the thread is related to changes that occurred in the evil packages over the last year, which definitely wont be in master if that is what is actually been used.#2024-02-0521:01practicalli-johnnyIf develop branch is being used. I suggest moving any Spacemacs user configuration files or directories, e.g. $HOME/.spacemacs or $HOME/.spacemacs.d or the XDG location, or any $SPACEMACSDIR file.
Then start Emacs and let spacemacs create a new user config and see if the issue still remains.
Starting Emacs this way should prompt a question from Spacemacs about Evil vs Holy mode (select evil) and if to use the standard or bare distribution (select standard).#2024-02-0521:02practicalli-johnnyThere are more ideas in the troubleshooting guide.
https://practical.li/spacemacs/install-spacemacs/troubleshooting/#2024-02-0521:02jumarYou are right, I'm on develop#2024-02-0521:02jumarFrom https://www.spacemacs.org/#spacemacs
git clone ~/.emacs.d
#2024-02-0521:04jumarI should have made it clear that I did a really fresh installation.
I did not copy over my old .spacemacs file at all.
And I selected evil and standard installation#2024-02-0521:05jumarI had p;roblems with 29.x versions before that's why I suspect it might cause those problems.
I might try 28.2 to see if it makes any difference#2024-02-0521:05practicalli-johnnyIt could just be a corrupted package download or a bad compile of the evil packages. In which case I would delete the evil packages or .elc files from the evil package directories in .emacs.d/elpa/29.2/develop/#2024-02-0521:07practicalli-johnnyMany people also recommend usinghttps://github.com/d12frosted/homebrew-emacs-plusfor MacOSX (this is what I have been using on a Mac since Emacs 29)#2024-02-0521:08practicalli-johnnyI am not using native compilation on the Mac and it seems to run okay without it. (AMD chipset on Mac, not intel)#2024-02-0521:08jumarI have m3 pro.
I'll try emacs plus and fresh installation#2024-02-0522:36jumarSeems to be working better now - thanks!#2024-02-0908:12jumarI'm trying to install neotree because I don't like treemacs as much but getting this
unknown layer neotree
#2024-02-0908:12jumarIt used to work before on my old computer..#2024-02-0908:15jumarI don't see anything special in the docs https://develop.spacemacs.org/layers/+filetree/neotree/README.html#2024-02-0910:02practicalli-johnnyAs treemacs has been the default in develop for many years, perhaps there is a bug with the neotree layer.#2024-02-0911:29practicalli-johnnyI commented out treemacs layer and added neotree and restarted Emacs.
Neotree seems to work okay. Using neotree seems to limit some of the LSP mode features, which use treemacs.
From the *messages*buffer:
(Spacemacs) --> refreshing package archive: melpa... [1/3]
Contacting host: melpa.org:443
Importing package-keyring.gpg...done
Contacting host: melpa.org:443 [2 times]
Package refresh done
(Spacemacs) --> refreshing package archive: gnu... [2/3]
Contacting host: elpa.gnu.org:443
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443
Package refresh done
(Spacemacs) --> refreshing package archive: nongnu... [3/3]
Importing package-keyring.gpg...done
Contacting host: elpa.nongnu.org:443
Package refresh done
(Spacemacs) --> installing package: neotree@neotree... [1/1]
Parsing tar file...done
Extracting...done
INFO Scraping files for loaddefs...done
GEN neotree-autoloads.el
Checking /Users/johnny/.config/emacs/elpa/29.2/develop/neotree-20230815.219... [3 times]
Compiling /Users/johnny/.config/emacs/elpa/29.2/develop/neotree-20230815.219/neotree.el...done
Wrote /Users/johnny/.config/emacs/elpa/29.2/develop/neotree-20230815.219/neotree.elc
Checking /Users/johnny/.config/emacs/elpa/29.2/develop/neotree-20230815.219...
Checking /Users/johnny/.config/emacs/elpa/29.2/develop/neotree-20230815.219/icons...
Done (Total of 1 file compiled, 2 skipped)
Package 'neotree' installed.
(Spacemacs) --> deleting treemacs-projectile... [1/9]
Package 'treemacs-projectile-20230703.1929' deleted.
(Spacemacs) --> deleting treemacs-persp... [2/9]
Package 'treemacs-persp-20230703.1929' deleted.
(Spacemacs) --> deleting treemacs-magit... [3/9]
Package 'treemacs-magit-20230830.1936' deleted.
(Spacemacs) --> deleting treemacs-icons-dired... [4/9]
Package 'treemacs-icons-dired-20230930.1141' deleted.
(Spacemacs) --> deleting treemacs-evil... [5/9]
Package 'treemacs-evil-20230822.2039' deleted.
(Spacemacs) --> deleting treemacs... [6/9]
Package 'treemacs-20240126.642' deleted.
(Spacemacs) --> deleting pfuture... [7/9]
Package 'pfuture-20220913.1401' deleted.
(Spacemacs) --> deleting lsp-treemacs... [8/9]
Package 'lsp-treemacs-20230811.611' deleted.
(Spacemacs) --> deleting cfrs... [9/9]
Package 'cfrs-20220129.1149' deleted.
#2024-02-0911:35practicalli-johnnyExample of neotree working.#2024-02-0917:06jumarI gave up for now and trying to use treemacsā¦#2024-02-1106:51dumratVery new to emacs/spacemacs.
(cursor indicated by | in below samples)
I often find myself doing this:
1. I have a expr :
(defn example [val]
(do "something")
|(do "something else"))
2. press SPC k d x to delete the second expr :
(defn example [val]
(do "something")
|)
Is there a way to auto-fix (format) the entire expression afterwards?
Right now what I do is d d at this point. It's not that troublesome, just wondering.#2024-02-1108:02practicalli-johnnyI use d d myself which automatically updates the formatting (assuming https://practical.li/spacemacs/structural-editing/cleverparens/)
Otherwise I would save the file to update formatting (clojure-lsp format on save) or explicitly use the format menu, , = to format the file or a selected region.
Or for this specific example,in normal mode k J to go up a line and join the next line to the current.
The SPC k smartparens menu is very powerful, although many of its commands can also be done with vim-style normal mode commands if that edit g style is more familiar#2024-02-1216:53dumratIs it normal that formatting .clj files is sluggish in the practicalli setup?
When the file length grows to be around 80 lines, I've noticed this couple of times. Whenever I refactor something a bit, I can notice the slowness.
If I format the entire document with , = = that too is slow (sometimes 2-3 secs or even more).#2024-02-1217:51practicalli-johnnyI haven't noticed anything myself.
First think I would check is the clojure-lsp version being used by Emacs.
Does having the repl running affect the speed of format (could be cider & clojure-clj fighting, but this is unlikely although easy to check)
It could be native compilation, I found Emacs a bit slower for some things with it enabled. I compiled Emacs 29.2 without native-como at the weekend, so will give that a try this evening and see if I can replicate the format issue#2024-02-1217:53dumratI have around 10 clj buffers open. Does that matter?
I'm asking because quite new to spacemacs.#2024-02-1217:56practicalli-johnnyUsually it's very long linese.g 100s of characters.
Or lots of line, e.g in a log buffer or repl buffer (although Practicalli sets a repl buffer line limit of 100 lines)#2024-02-1217:57practicalli-johnnyIf Emacs is fast otherwise, then it's probably a package that's not behaving properly.#2024-02-1217:58practicalli-johnnyIf you have some examples code to share that has the problem, I can test it out.#2024-02-1217:59practicalli-johnnyIf there is general slowness it's usually the combination of a specific Emacs distribution and a specific Operating system#2024-02-1218:06dumrathttps://github.com/nakiya/htmx-examples-clojure
I'm working on this and I have most of the clj files open I guess.
Ubuntu 22.04, emacs v29.2, nproc = 8#2024-02-1218:14practicalli-johnnyI will give it a try after dinner. It could be htmlx aspects.
Is there a difference between the speed of using
, = b (which calls lsp-format-buffer ) and
, = = (which calls cider-format-buffer )#2024-02-1218:15dumrat, = b says:
LSP :: No formatting changes provided#2024-02-1218:16dumratoh wait#2024-02-1218:16dumratOh yeah#2024-02-1218:16dumrat, = b is instant#2024-02-1218:18dumratWhile , = = takes ~2 secs. First the entire buffer text coloring disappears and gets reformatted at the end.#2024-02-1219:26practicalli-johnnyI suspect there is something in the htmx examples code that trips up the Cider format, perhaps because its htmlx (although that is a guess).
One way is to try a different Clojure project and see if the issue occurs there too.
Or use , = b and avoid the issue.#2024-02-1220:17practicalli-johnnyI cant seem to emulate the issue, at least not in a way I notice.
I guess would be that Clojure LSP is formatting the buffer after using , = = is used to format the buffer with Cider. Resulting in the code sense and syntax highlighting being refreshed.#2024-02-1220:19practicalli-johnnyOr it could be an issue with the LSP mode client, but that seems less likely.
I suggest sticking with , = b and = r to format the buffer or region using LSP rather than Clojure.
Or if not using Clojure LSP diagnostic and tools, disable Clojure LSP formatting.#2024-02-1302:25dumratThanks. Will try out.#2024-02-1303:29dumratI don't have time to check for a day or two, but if wanted to find out what's causing the sluggishness, how do I go about it? Any general pointers on debugging this kind of thing?#2024-02-1308:37practicalli-johnnyThe troubleshooting page has some guidance on debugging issues
https://practical.li/spacemacs/install-spacemacs/troubleshooting/#scorched-earth-approach#2024-02-1605:40dumratThe sluggishness seems to have gone down a little bit. I reset my spacemacs and cleaned up some of my user customizations. But it's still not as snappy as I see people have in videos.#2024-02-1221:35jumarWhen searching for a command, I'm not able to select anything that's in the second section - only ones in History.
Neither arrow down nor C-n work.
This used to work for me some time ago but it broke at same point.
Even after I did a new installation,it's still broken.
Anyone else experiencing the same problem?
How can I debug it?#2024-02-1222:46practicalli-johnnyI'm using Emacs 29.2 and arrow keys or C-j & C-k navigate history and recent lists#2024-02-1223:45jumarYou don't use evil mode?#2024-02-1308:34practicalli-johnnyI am using Evil mode (for many years now).
I wonder if the issue is related to the changes in helm-descbinds (although that seems unlikely).
I will run another Spacemacs package and see if I can replicate the issue
I think I'll pin an older version of helm-descbinds as it's still interfering with which-key (until the maintainer of that package stops actively breaking things)#2024-02-1318:50jumarThanks,
I am eager to hear what you find #2024-02-1422:48practicalli-johnnyI havent been able to replicate the issue. I can use arrow keys, C-j , C-k, C-n & C-p to navigate the helm list.
Maybe there is some issue with the .spacemacs (or .spacemacs.d) configuration being used. That is the only thing I can think of.#2024-06-1106:52jumarI'm still suffering from this problem with navigation in helm buffers.
The other place where it shows is list-buffers - as with commands, I enter a partial name and it shows some matches from open buffers. But I'm not able to move to the Recentf section at all.
Pressing C-n / C-p only oscillates between the items in the Buffers section.
I can jump to Create buffer via C-v or M-S-v#2024-06-1106:52jumarI'm still suffering from this problem with navigation in helm buffers.
The other place where it shows is list-buffers - as with commands, I enter a partial name and it shows some matches from open buffers. But I'm not able to move to the Recentf section at all.
Pressing C-n / C-p only oscillates between the items in the Buffers section.
I can jump to Create buffer via C-v or M-S-v#2024-02-1317:21dumratAny good way to track TODO items in source code with spacemacs?
org-capture doesn't do it for me (At least the way I'm using it). Any TODOs in a project-wide or global org file gets invalid if I update source.#2024-02-1317:51zaneMaybe this? https://github.com/alphapapa/magit-todos#2024-02-1317:54dumratLooks good. Will check it out. Thanks.#2024-02-1400:37practicalli-johnnyI use Magit to-dos which shows all my to-dos in the Magit status buffer#2024-02-1422:51practicalli-johnnyThere has been a change to the helm-discbinds Emacs package which can prevent which-key menu from displaying.
https://github.com/syl20bnr/spacemacs/issues/16276
I've added the following to the Practicalli Spacemacs-config to prevent helm-discbinds mode from automatically loading and interrupting which-key. This seems to work well.
(remove-hook 'helm-mode-hook 'helm-descbinds-mode)
This change has been pushed to the Practicalli spacemacs-config repository#2024-02-1506:04dumratI encountered this some days back on WSL2 and I just reinstalled everything and got resolved.#2024-02-1506:31dumratOne slight annoyance:
I'm in a rich comment block and I want to slurp the random-uuid call. cursor indicated by |
(comment
(str |)(random-uuid)
,,,)
So, SPC k s and it becomes this:
(comment
(str (random-uuid)))
Still fine, I can eval ok and everything but is there a way to disable this?#2024-02-1509:44azimpelI always put an "\n" at the end of the comment form like this:
(comment
(str "hello") "there"
\n
)#2024-02-1509:46Lars Kristian Maron TelleI'm doing a same using #_f. I'd like to config it away, if possible. š#2024-02-1510:56practicalli-johnnyI haven't found a rule to disable this behaviour.
I tend to use #_() to stop the format bring up the closing comment paren.
I have a rich-comment snippet in Practicalli Clojure LSP Config that creates the following code
(comment
#_())
#2024-02-1510:58practicalli-johnnyA very simple approach is to add a , (comma) before the closing paren of the comment expression, as commas are considered whitespace by the Clojure reader#2024-02-1511:00practicalli-johnnyAlternatively, I've found this less of an issue when using the parinfer approach rather than paredit. Although that is a bit of a cognitive change to writing code. I've only used parinfer with Neovim so far (works well though and I am less concerned with paren wrangling)#2024-02-1511:05azimpelA simple comma is not working as it gets collapsed anyway.#2024-02-1605:51dumratI resorted to using the snippet and I think that's a good enough solution.#2024-02-1513:50dumratI realized I can get lost in emacs for hours fixated on how to automate some trivial thing š#2024-02-1517:33practicalli-johnnyIn my first year with Spacemacs I did spend quite a bit of time just submitting PRs to Spacemacs and extending my own user config.
I dread to think how long it would have taken if I had tried doing this from scratch.
I would certainly be using far fewer features, even nearly a decade later...#2024-02-1517:41dumratI went and had a look at some emacs/spacemacs use videos including one of yours.
I think I'll gradually ease into it. For now, I am so happy with magit, magit todos, cider integration and portal. I have few kbds memorized but if I go crazy on spacemacs and your config I think I'll burn out. š#2024-02-1517:42dumratmagit is the best git client I think I've used#2024-02-1519:09practicalli-johnnyMagic Forge is great too, if using GitHub for issues and PRs (which can be created & updated in Emacs)#2024-02-1605:45dumratsmall query:
I have the following function composition used in my code in a few places:
(util/hiccup-response
(util/wrap-page ...)) ;; Not always on two lines
I created a single function that does this because I realized these are always used together (at least until now). Let's say : util/hiccup-page
Is there a way to refactor these expressions than searching for all occurrences and replacing manually?#2024-02-1606:32practicalli-johnnyIf it was on one line then helm-ag could be used to edit the search results and apply changes across the project.
e.g SPC / to search across the project, C-c C-e to edit the list of search results, make changes (optionally using iedit or multiple cursors), save changes to apply them across the project
I vaguely remember an option to show more than one line in search results, but don't remember trying that with helm-ag#2024-02-1612:11dumratQuick q (cursor indicated with |:
In the following:
{:get {:handler | main}
:name ::main}
If I press D now, it becomes this:
{:get {:handler
:name ::main}
But the same action if done in the second line, preserves the curly brackets. Any idea?#2024-02-1612:15practicalli-johnnySounds like paredit is working for the second D press. but evil-cleverparens is not enabled to prevent the } being deleted from the first D press.
Add the following to the Spacemacs user config in dotspacemacs/user-config section
(spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hooks)
#2024-02-1612:16practicalli-johnnyMore details at https://practical.li/spacemacs/structural-editing/cleverparens/#2024-02-1612:25dumratDoesn't work. I toggled evil-cleverparens-mode manually and tried with the same result.#2024-02-1615:23tomd@UC1DTFY1G I maintain evil-cleverparens so would be interested in a repro if you have one. With just what you've shared above and using just evil & evil-cleverparens, no unbalanced parens appear, so I'm guessing it's something to do with spacemacs. But if you find something specific to evil-cleverparens I'd be keen to fix š#2024-02-1615:26dumratLet me try to figure out. I'll update with what I can find#2024-02-1617:35practicalli-johnnyIt does seem hash-maps become unbalanced, either a flat hash-map or nested hash-map.
D correctly keeps balance when the hash-map is surrounded by a different type of parens, eg. list or vector. Unbalanced when no other surrounding strucutrure exept for anothe rhash-map
;; D deletes closing paren on first line - unbalanced, although dd does work as expected
{:get {:handler :get-clojure}
:name ::main}
;; deletes closing paren - unbalanced
{:get :clojure}
;; delete anywhere in hash-map keeps balance
[{:get :clojure}]
;; delete anywhere leaves unbalanced
{:get {:closure {:with ::clojure}}}
;; delete within hash-map keeps parens balanced
(clojure.pprint/pprint {:get :clojure})
;; delete within hash-map keeps parens balanced
(def data-analysis
[{:get :clojure}])
;; delete in vector keeps parens balanced
[:get :clojure]
;; delete in hash-map keeps parens balanced
[:get {:clojure :repl}]#2024-02-1617:39tomd@U05254DQM all of the above work for me with just evil & evil-cleverparens. Sorry for being a non-spacemacs user in #spacemacs - I keep an eye for evil stuff. So if you can repro without spacemacs, or can figure out the spacemacs cause, if there's anything evil-cleverparens can do to help, I'll take a look.#2024-02-1711:08practicalli-johnnyI didn't find anything obvious from the use of evil-cleverparens in the Spacemacs configuration.
These seem edge cases to me anyway as I replace the value in the hash map rather than use line-delete with a value from a key value pair, as logically deleting only the value unbalances the semantics of the hash-maps itself.
If I do stumble across something, I'll share.#2024-02-2014:48jumarIs it possible to make treemacs show projects only from the current layout?
At the moment, it's showing all the layouts' projects and it's quite messy.
I only found https://www.reddit.com/r/spacemacs/comments/fl6goy/treemacs_show_only_projects_present_in_current/ but no help there.#2024-02-2014:51jumarI found treemacs-display-current-project-exclusively but that's too manual - I would like to enforce this behavior by default, not every time I visit a different layout.
https://github.com/Alexander-Miller/treemacs?tab=readme-ov-file#navigation-without-projects-and-workspaces#2024-02-2016:21practicalli-johnnyI've used follow mode for quite a while and it seems to work well enough for me. In my Spacemacs layer config I have this for treemacs
(treemacs :variables
treemacs-indentation 1
treemacs-use-filewatch-mode t
treemacs-use-follow-mode t)#2024-02-2016:45jumarBut that sounds like a different thing.
I sometimes want to explore the tree without first opening any particular file#2024-02-2811:51jumarI use cryogen with asciidoc and want to associate .asc files with asciidoc layer / adoc-mode
Is https://emacs.stackexchange.com/questions/17887/how-do-i-associate-a-file-extension-with-a-specific-mode how you do it?
(add-to-list 'auto-mode-alist '("\\.asc\\'" . adoc-mode))#2024-02-2904:45jumarI added asciidoc layer and the above snippet in user-config but even after closing and opening a file with .asc suffix it still shows Web as the major web mode#2024-04-1110:56jumarI just updated to latest develop and also all the packages (via SPC f e U)
and now I have problems with structural editing commands.
It says Symbol's function definition is void for stuff like sp-forward-slurp-sexp or sp-splice-sexp-killing-forward
Anybody else experiencing the same problem?
Any ideas how to fix it or at least get more information about the problem?#2024-04-1110:56jumar#2024-04-1111:14jahsonIāve deleted .emacs.d/elpa/{EMACS_VERSION} and restarted emacs.#2024-04-1111:14jahsonThis error disappeared.#2024-04-1111:38jumarI'm not sure I understand the effects of doing that - can you explain a bit more?#2024-04-1111:55jahsonThis forces emacs to redownload and recompile all packages.#2024-04-1112:03practicalli-johnnyI recommend restarting Emacs after package updates downloaded. e.g. SPC f e U to get updated packages, SPC q r to initiate the package downloads, then SPC q r after all packages downloaded. This usually resolves warning like definition is void
Removing packages from the Spacemacs elpa directory simply causes Spacemacs to download the package again. This can be useful if a package didnt download or compile correctly.
I also recommend checking the spacemacs template for changes. e.g. .spacemacs or .spacemacs.d/init.el configuration.
SPC f e D will open a diff session to readily check your configuration against the template. Important if your config was created more than a year ago.#2024-04-1112:24jahsonAgree. I usually encounter issues with Magit after updates, and restarting Emacs typically resolves them. However, in this particular case, the issue persisted even after restarts, so I had to delete the downloaded packages.#2024-04-1112:34practicalli-johnnyI am also getting the same error after a package update, so it could be a bug with the package.
If there is a bug, thenhttps://practical.li/spacemacs/install-spacemacs/troubleshooting/#emacs-package-recipe-for-specific-versionwould be one way to manage the issue. Or download an older package
Or raise the issue SPC h I on Spacemacs or with the specific package repository.
Of course, the specific package with the bug needs to be identified first. I'll take a look and see if there is something obvious.#2024-04-1112:36practicalli-johnnyThe older package may be in the Spacemacs cache, if so you could copy the packages that seem relevant from there
https://practical.li/blog/pin-emacs-packages-to-manage-issues/#copy-package-from-rollback-cache#2024-04-1112:37jahsonAnd there is also an option to rollback package update.#2024-04-1112:56practicalli-johnnyI copied smartparens-20231024.1804 from the cache to the elpa directory and removed the new pacakge from the elpa directory.
After a restart, the slurp command works without error.
So probably a simple bug in smartparens package.#2024-04-1113:15practicalli-johnnyRaised an issue on smartparens repository (feel free to add anything else you think would be useful)
https://github.com/Fuco1/smartparens/issues/1204#2024-04-1113:17jumarThank you both.
As @U071CG4QY suggested, I deleted .emacs.d/elpa/29.2 and it seems to be working now.#2024-04-1113:39jahsonIt seems the issue can somehow reappear, in the end Iāve rolled back the update.#2024-04-1709:16practicalli-johnnyAn updated version of SmartParens has been released which resolved the issue. Structured editing commands are working again in package version smartparens-20240416.2253#2024-06-2618:54Aaron CooleyNot specific to Clojure, but does anyone have a .spacemacs (or .emacs.d) that allows Spacemacs to run without checking packages? I've got a production server at work that I do a decent amount of analytics on, and I can install Emacs/Spacemacs just fine by lifting and dropping files onto the server, but the firewall is strict and access to MELPA is blocked. I've tried unsuccessfully to get MELPA unblocked, so have settled on manually dropping needed packages into .emacs.d/elpa/29.1/develop.
The problem is that whenever I open Spacemacs, it tries to update packages and then hangs. I've tried to configure my .spacemacs not to check for updates, but it does so no matter what I try.
TL;DR does anyone have a Spacemacs config that allows them to run it without trying to access ELPA?#2024-06-2619:10practicalli-johnnyThese two settings may help
;; If non-nil ELPA repositories are contacted via HTTPS whenever it's
;; possible. Set it to nil if you have no way to use HTTPS in your
;; environment, otherwise it is strongly recommended to let it set to t.
;; This variable has no effect if Emacs is launched with the parameter
;; `--insecure' which forces the value of this variable to nil.
;; (default t)
dotspacemacs-elpa-https t
;; Maximum allowed time in seconds to contact an ELPA repository.
;; (default 5)
dotspacemacs-elpa-timeout 5
It may also be useful to check for the https://github.com/syl20bnr/spacemacs/blob/develop/core/templates/.spacemacs.template and ensure that your .spacemacs file is up to date#2024-07-0115:22murtaza52I updated my system (arch linux), and after restarting emacs it reinstalled spacemacs packages.
Now the SPC SPC shortcut doesnt work, parens mode is not working so SPC k r will not work etc, not sure what is went wrong and how do I debug it.#2024-07-0115:25practicalli-johnnyI always restart Emacs after it downloads packages. To make sure they downloaded and to make sure they all loaded when Emacs started.
If Spacemacs is still not working after that, you could try the scorched earth approach and delete the elpa directory and try again (as a relatively quick hack). Dont do this if your switching back to the previous version of Emacs (or delete the devel/emacs-version directory for the newest version of Emacs)
Otherwise open the *messages* buffer and see if there are specific errors or scary looking warnings.
https://practical.li/spacemacs/install-spacemacs/troubleshooting/ has more suggestions for troubleshooting Spacemacs#2024-07-0115:27practicalli-johnnyI assume a new point release of Emacs was installed in Arch Linux, e.g. was 29.2 and is now 29.3.
Things might break a bit if Emacs 30 mightly was installed, but probably not as much as you originally described#2024-07-0115:41murtaza52emacs version is 29.4#2024-07-0115:57murtaza52@U05254DQM which is the emacs version you are using ?#2024-07-0116:41practicalli-johnnyI am on Emacs 29.2 on Mac and 29.3 on Linux. It seems that Emacs 29.4 is on Termux, so I will run that now and see if there are any issues. I will let you know the results as soon as it finishes...
These things usually are a broken package, a bad package download or issues connecting to Melpa.
If its a bad download (and a good internet connection is available), then removing the elpa/develop/29.4 directory in .emacs.d or .config/emacs is arguably the simplest approach, then restart Emacs to downlod the packages again.#2024-07-0117:38practicalli-johnnyI think I've replicated a similar issue with Emacs 29.4.
When on the Spacemacs home buffer I do get the which-key menu after pressing the SPC key.
When in Clojure major mode or markdown major mode, pressing SPC or , keys does not show the which-key menu. However, the keys do seem to launch the Emacs commands even though the menu is not shown#2024-07-0117:55murtaza52deleting elpa and reinstalling packages worked ... now the keys are working. however evaluation in buffer does not work in clojurescript. I need to try with other versions of emacs and check.